how will you find out the last three records in a table
with n no of records and delete them
Answer Posted / aswin
This query cost the performance :
delete from emp where empno in (select empno from (select
empno from emp order by rowid desc) where rownum <= 3)
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is the difference between the implicit and explicit cursors?
Can we declare a column having number data type and its scale is larger than pricesionex: column_name number(10,100),column_name numbaer(10,-84)
Explain sql data types?
Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
What are types of indexes in sql?
Could you please provide oca (oracle 10g) dumps for my certification ?
Does view store data in sql?
What is java sql driver?
Is sqlite good enough for production?
what is a constraint? : Sql dba
What is a database event trigger?
Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?
Explain normalization and what are the advantages of it?
What are the parts of a sql statement?
How do you delete data from a table?