Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Select Unique col from
- (select col from table1 union select col from table2) alias
- Select Distinct col from
- (select col from table1 union select col from table2) alias
- Create Table Employee(
- Emp_PKey Int Identity(1, 1) Constraint PK_Employee_Emp_PKey Primary Key,
- Emp_SSN Numeric Not Null Unique,
- Emp_FName varchar(16),
- Emp_LName varchar(16)
- )
- Select Distinct Emp_LName
- From Employee
- select col from table1
- union
- select col from table2
- select col from table1
- union all
- select col from table2
Add Comment
Please, Sign In to add comment