![]() Related Questions Self join-Its a join foreign key of a table references the same table. Outer Join--Its a join condition used where One can query all the rows of one of the tables in the join condition even though they Latest Answer : Two join conidtion we can use for subqueries: Equi Join,Self Join ... Rename is a permanent name given to a table or column whereas Alias is a temporary name given to a table or column which do not exist once the SQL statement is executed. Latest Answer : Rename: ALTER TABLE table_name RENAME TO table_name1 (here the table_name is changed to table_name1 and table_name1 is stored in database.)Alias: SELECT column_name "Col1" FROM table_name(here Col1 is not stored in database.) ... A view is stored procedure based on one or more tables, it’s a virtual table. Latest Answer : A view is a subset of tables. View is not stored as physical in database. ... A table can have only one PRIMARY KEY whereas there can be any number of UNIQUE keys. The columns that compose PK are automatically define NOT NULL, whereas a column that compose a UNIQUE is not automatically Latest Answer : Primay Key Unique key----------- ... delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name); ordelete duplicate_values_field_name dv from table_name ta where rowid Latest Answer : DELETE FROM table_name a WHERE rowid > (SELECT min(rowid) FROM table_name b WHERE a.column_name=b.column_name) ... It is a column that is not an actual column in the table.eg USER, UID, SYSDATE, ROWNUM, ROWID, NULL, AND LEVEL. Latest Answer : Pseudo columns is not actula column in the table. it behaves like table columnwe can retivesv values of pseduo column but can not insert,update or delete value in that.has two data type 1. rowid 2. urowidrow id uniqely identify row in databaseEXM ... Suppose a customer table is having different columns like customer no, payments.What will be the query to select top three max payments? SELECT customer_no, payments from customer C1WHERE 3 SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal Latest Answer : SELECT min(salary) FROM (SELECT DISTINCT TOP 6 salary FROM empinfo ORDER BY salary DESC) empinfo; ... A bad answer is count them (SELECT COUNT(*) FROM table_name)A good answer is :-'By generating SQL to ANALYZE TABLE table_name COUNT STATISTICS by querying Oracle System Catalogues (e.g. USER_TABLES Latest Answer : If you want to find the number of Rows in table SELECT COUNT(*) FROM EMP;This is valid query ... select level, min('col_name') from my_table where level = '&n' connect by prior ('col_name') Latest Answer : TO find out nth LOWEST value, e.g. salary from emp table without using ROWNUM & DESC/ASCSELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) ...
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||