raghunanda


{ City } bangalore
< Country > india
* Profession * developer
User No # 116967
Total Questions Posted # 0
Total Answers Posted # 2

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 0
Users Marked my Answers as Wrong # 0
Questions / { raghunanda }
Questions Answers Category Views Company eMail




Answers / { raghunanda }

Question { Oracle, 33898 }

how to retrieve the top 3 salaries of the table using rownum


Answer

SELECT * FROM(SELECT * FROM EMP ORDER BY SAL DESC) WHERE ROWNUM<=3;

Is This Answer Correct ?    0 Yes 0 No

Question { 11863 }

How to copy a table in another table with datas?


Answer

---With date from existing table to new table.
SQL> create table new_table_name as select * from old_table_name where 1=1;
---without data
SQL> create table new_table_name as select * from old_table_name where 1=2;

Thanks,

Is This Answer Correct ?    0 Yes 0 No