Dear Friends,
I m trying to learn on set operators in MSSQL,so i created two tables
CREATE TABLE Students2000(
Name VARCHAR(15),
TotalMark INT)
CREATE TABLE Students2005(
Name VARCHAR(15),
TotalMark INT)
INSERT INTO Students2000 VALUES('Robert',1063)
INSERT INTO Students2000 VALUES('John',1070)
INSERT INTO Students2000 VALUES('Rose',1032)
INSERT INTO Students2000 VALUES('Abel',1002)
INSERT INTO Students2005 VALUES('Robert',1063)
INSERT INTO Students2005 VALUES('Rose',1032)
INSERT INTO Students2005 VALUES('Boss',1086)
INSERT INTO Students2005 VALUES('Marry',1034)
when i tried to make intersect and except in above table its not working showing error on it
select * from Students2000
except
select * from Students2005
ERROR:Incorrect syntax near the keyword 'EXCEPT'.
What was the problem here ????