(1) oracle database up to 1000 elements in the limit:
select * from a where id in (1,2 ,..... 1001); will get an error reported in the elements can not exceed 1000.
select * from a where id in (select id from b where rownum <6002); the statement does not complain normal operation.
Of the principle, I do not understand.
(2) a statement to remove duplicate records (one or more columns repeat):
delete from TABLENAME where rowid not in
(Select max (rowid) from TABLENAME group by (COL1, COL2, COL3 .... COLn);
(3) conditions of the query by date record of the day:
select * from TABLENMAE
where createTime> = to_date (: date, 'YYYY-MM-DD')
and createTime <to_date (: date, 'YYYY-MM-DD') + 1
(4) must remember that according to the query page the only key to sort, otherwise inexplicable occurrence of certain record series of the page:
from (select a. *, rownum row_num from tableName a order by a.uniqueColumn)
where row_num <= 100
and row_num> 80