I have used opencsv libray to write the ResultSet in a csv file,using the writeAll method.Since the database is very big i have to split database records and write them to different csv files(For example every 1000 rows must be written in different files.) I have read about this but i havent suceded.I have used something like
select * from table1
Order by id
OFFSET 0 FETCH NEXT 1000 ROWS ONLY;
but it doesnt work.Can someone tell me how to achieve this please?