select 'drop table '||schemaname||'.'||tablename||';' as "batch_sql" from sys_tables where schemaname='exam';
select current_date()+11;
select * from exam.student limit 2;
select * from (select rownum rn,sno,sname,city from exam.student) where rn<=2;
select * from exam.course order by pass_mark limit 0,2;
select * from exam.course offset 0 rows fetch next 2 rows only;
test=# select rownum,ctid,t.sno from exam.student t;
rownum | ctid | sno
--------+-------+------
1 | (0,1) | 1001
2 | (0,2) | 1002
3 | (0,3) | 1003
4 | (0,4) | 1004
5 | (0,5) | 1005
6 | (0,6) | 1006
7 | (0,7) | 1007
8 | (0,8) | 1008
(8 行记录)
select sno,gender,sname,job,company from exam.student
where (job,city) in (select job,city from exam.student where sno in ('1001'));