Set rowcount
Posted in 1997
Topics: SQL Development & Query Writing
There have been discussions here recently about the "SET ROWCOUNT" command. This is a Sybase (and I think also Oracle) command which enables you to tell the DB to only return or act upon x rows. For example, if you only want the 1st 30 rows of a SELECT statement's results. Alternatively, if you want to delete 5,000,000 rows but don't want to fill up the logs, you can set rowcount to 10,000. When you run the statement "DELETE from table", it will only impact 10,000 rows. You'd run it repeatedly until you hit 5,000,000. Informix XPS has this feature. Also, I was informed that it's a feature request for ODS but it's not presently scheduled for an upcoming version. Hope this helps somebody. David David Samson, Senior Database Researcher dsamson@ndsisrael.com NDS Technologies Israel Ltd. +972 2-589-4529 PO Box 23012 Fax: +972 2-589-4578 Jerusalem, Israel