May 4, 2012
Select specific row from mysql table
Question by Marlon Brando
Ideally I need a query that is equal to
select * from customer where row_number() = 3
but thats illegal.
I cant use an auto incremented field.
row_number() is the row that needs to be selected.
How do I go about this?
EDIT: Well, I use iSql*plus to practice, and using limit and auto_increment is illegal for some reason. I ended up creating a sequence and a trigger and just uped the id by 1 everytime there was an entry.
Answer by Starx
You cannot select a row like that. You have to specify a field whose values will be 3
Here is a query that will work, if the field you are comparing against is id
select * from customer where `id` = 3