2 - SQL UNION Operator | UNION | UNION ALL I INTERSECT | EXCEPT

Published: 23 July 2022
on channel: DMK IT Solutions
300
2

Visit my channel & Subscribe
   / @dmkitsolutions  
See other step by step video series below: -

USE master
GO

--Check if C9_OfficeSupplies database exists
IF NOT EXISTS(SELECT * FROM sys.databases WHERE name = 'C9_OfficeSupplies')
BEGIN
/*
Create database
Database Name: C9_OfficeSupplies
*/
CREATE DATABASE C9_OfficeSupplies

END


--Use Database
use C9_OfficeSupplies
GO

/*

*/

--Check if t1 table exists
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='t1' and xtype='U')
BEGIN
--Create table t1
create table t1(Name varchar(20), Country varchar(20))
END

---Check if t2 table exists
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='t2' and xtype='U')
BEGIN
--Create table t2
create table t2(Name varchar(20))
END

--delete all records from t1
delete from t1

--Insert records into t1 table
insert into t1(Name, Country)
values('Fine','Qatar'),
('Jean','USA'),
('Grace','italy'),
('Alex', null)

--delete all records from t2
delete from t2

--Insert records into t2 table
insert into t2(Name)
values('Mary'),
('Evenlyn'),
('Ibrahim'),
('Jean'),
('Fine')

--select ALL records from table t1
select * from t1

--select ALL records from table t2
select * from t2




Creating a Relational Database | Tables | Primary Key Vs Foreign Key Relationship | SQL
   • Video  

Microsoft SQL Database - Creating a New Database
   • Microsoft SQL Database - Creating a N...  

SSIS - Load data like an Expert (Update Existing Records and Insert New Records)
   • 16 - SSIS : Load data like an Expert ...  

Power BI - Get Data from flat file (csv)
   • Power BI  - Get Data from flat file (...  

Microsoft Excel Dashboard
   • How to create Excel Dashboard | Pivot...  


For more details contact [email protected] or text +1 (858) 228 7289

Visit my channel & Subscribe
   / @dmkitsolutions  
See other step by step video series below: -


DATEPART() - SSIS Expression
https://docs.microsoft.com/en-us/sql/...

Creating a Relational Database | Tables | Primary Key Vs Foreign Key Relationship | SQL
   • Video  

Microsoft SQL Database - Creating a New Database
   • Microsoft SQL Database - Creating a N...  

SSIS - Load data like an Expert (Update Existing Records and Insert New Records)
   • 16 - SSIS : Load data like an Expert ...  

Power BI - Get Data from flat file (csv)
   • Power BI  - Get Data from flat file (...  

Microsoft Excel Dashboard
   • How to create Excel Dashboard | Pivot...  


For more details contact [email protected] or text +1 (858) 228


Watch video 2 - SQL UNION Operator | UNION | UNION ALL I INTERSECT | EXCEPT online without registration, duration hours minute second in high quality. This video was added by user DMK IT Solutions 23 July 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 300 once and liked it 2 people.