[SQL] random

2001-03-05 Thread Jelle Ouwerkerk
ate a random number between 1 and the total o fetch n times Option 1 uses 'OFFSET' which is a database-specific keyword, which is probably bad. Also, is there a way to randomize the order of a result set? Thanks in advance Jelle Ouwerkerk Software Developer Openface Internet Inc. M

[SQL] fetching the id of a new row

2001-02-08 Thread Jelle Ouwerkerk
Hi, How might I insert a new row into a table and return the id of the new row all in the same SQL statement? The id is generated by a sequence. Up to now I've been getting the nextval of the sequence first and then inserting with the id in a second SQL exec. Is there a faster way (in a general c