Answer Posted / subhani
some of above have used corelated subqueries but it is not
recommonded to use.
best way is
select * from emp where rownum<=5
minus
select * from emp where rownum<5;
| Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.
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 date and time functions in mysql? : Sql dba
Explain isolation levels. : Transact sql
How do you explain an index?
How do I audit the sql sent to the server?
How do I run a pl sql procedure in sql developer?
Can ddl statements be used in pl/sql?
How many types of tables are there?
What is auto increment?
What is sql*plus?
Write a sql select query that only returns each name only once from a table?
Does truncate table reset auto increment?
Can delete statement be rollbacked?
How to return multiple rows from the stored procedure?