Search
 
SCRIPT & CODE EXAMPLE
 

SQL

difference between join vs union

JOIN combines the ROWs, we will have longer rows at the end. 
We are joining the rows from two or more related tables.

UNION combines the COLUMNs, we will have longer columns at the end.
UNION combine two different query.
We are joining the columns from two or more related tables.
Can be non related tables but queries must select same column names
with same data type.
Comment

join vs union

JOIN combines the ROWs, we will have longer rows at the end. 
We are joining the rows from two or more related tables.

UNION combines the COLUMNs, we will have longer columns at the end.
UNION combine two different query.
We are joining the columns from two or more related tables.
Can be non related tables but queries must select same
column names with same data type.
Comment

PREVIOUS NEXT
Code Example
Sql :: sqlite create tables 
Sql :: get last 50 rows sql 
Sql :: how to access to mysql without root 
Sql :: postgresql get connection string 
Sql :: postgressql uuid 
Sql :: failed to connect to mysql at localhost:3306 with user root 
Sql :: sql between 
Sql :: sql inner join with where clause 
Sql :: oracle free up space in tablespace 
Sql :: insert into using contant values and source table columns with sql 
Sql :: enter mysql command line 
Sql :: what is the difference between clustered and non-clustered index in sql server 
Sql :: sql cast 
Sql :: alter table mysql 
Sql :: execute sp in sql server 
Sql :: change data type in mysql 
Sql :: postgresql parse json array 
Sql :: mysql vs postgresql 
Sql :: counting in sql 
Sql :: view table sql 
Sql :: sum value by month sql 
Sql :: find all tables with column name 
Sql :: how to write uppercase in sql 
Sql :: delete top 10 rows in sql 
Sql :: sql sequence 
Sql :: sql find all different values in column 
Sql :: mysql table schema 
Sql :: mssql-cli usage 
Sql :: oracle create table as select 
Sql :: sqlite alter table add multiple column 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =