Monday, 30 September 2013

How to write an SQL query to get records based on the order they were entered in?(no date col) [on hold]

How to write an SQL query to get records based on the order they were
entered in?(no date col) [on hold]

I need to write a SQL query that returns records in the order in which
they were entered in.
No. I can't add a column to the table or change the table in any way. I
can insert into and select from the table.
Say I execute three insert queries like insert into x values(a,1); insert
into x values(d,4); insert into x values(u,42);
when I select from the table x I need to get the records in this order. a
1 d 4 u 42

No comments:

Post a Comment