SQL: How would you split a 100,000 records from a Oracle table into 5 chunks?
问题 I'm trying to figure out away to split the first 100,000 records from a table that has 1 million+ records into 5 (five) 20,000 records chunks to go into a file? Maybe some SQL that will get the min and max rowid or primary id for each 5 chunks of 20,000 records, so I can put the min and max value into a variable and pass it into the SQL and use a BETWEEN in the where clause to the SQL. Can this be done? I'm on an Oracle 11g database. Thanks in advance. 回答1: If you just want to assign values 1