some sample SQL statement
1, where
select * from dept where deptno=12;
select * from dept where deptno=12 and name like 'THOMAS%';
-----------------------------------------------------------------------------------------
select * from dept where name_id <10>5;
select * from dept where name between 5 and 10;
-----------------------------------------------------------------------------------------
2,union, union all
union is only join the different
union all is for join all;
3,intersect, minus
intersect is for getting the same in the both;
minus is for fetch the different in the first table;
No comments:
Post a Comment