how to retrieve last tree records from table?
select *from emp where rownum > (select count(*)-3 from
emp);
i am using this query to get last three records from table
but its not giving any output, so please tell me what is the
error in this query.
Answer Posted / alok narayan
Rownum assigned at the runtime on the basis of rownum you
not fetch last three records.
for no records output: Rownum always use <= or >= , if use
rownum < or > its giving no output.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How many types of cursors supported in pl/sql?
How delete a row in sql?
What is scalar data type in pl sql?
What is difference between function and trigger?
what is table? : Sql dba
what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba
Can we use ddl statements in stored procedure?
Which table is left in left join?
What is dbo in sql?
how to drop an existing table in mysql? : Sql dba
How does index help in query performance?
How can we link a sql database to an existing android app?
in oracle 10g sw after compiling procedure how to pass parameter values ,if we (v_empid out number)how to give empid after successful compilation program.This site exact suitable for 10g with respect to question & answer same format , im trying sql browser & sql command prompt using exec procedure name & respective parameters.
Is progress software supports to ( pl/sql )?
What is structural independence and why is it important?