display the second lowest salary from emp table without using min & all
Latest Answer: select min(salary) from emp where salary!=(select min(salary) from emp)Try this it's 100% true answer ...
what is pivotal query?
Latest Answer: Pivot is a keyword using which the values in vertical rows can be displayed as horizontal columnsEx: If there is a table with all dates of month from 1st to 30th and values against each date. The table contains this data in the form of ...
I Tried by giving......................... ALTER table table name rename column tocolumn name was changed but it's not giving entire table with altered column name.It's giving only the altered
Latest Answer: to change name of one column alter table rename column to ;if we want to change more than one column alter table rename ...
please give some sub-query examples based on correlated sub-query and nested
Latest Answer: Correlated Sub Query:Select * from emp e where exists (select 1 from dept d where d.deptno = e.deptno)Nested Sub Query:Select * from emp e where deptno in (select deptno from dept d) ...
How do you print the last n rows or the first n rows of a table..?
Latest Answer: For top 10select * from ( select item,pack_ind from item_master order by item_level)where rownum
What is water mark apporach in SQL?
my script contains sql plus set commands. how to execute that script in a pl/sql block i.e. either anonymous ,procedure or function or trigger
Latest Answer: First you need to save your file in .sql format, suppose you create set.sql and saved it on c: drive then follow below command.SQL> @C:SET.SQL and press ENTERyour script has been executed. :-) ...
how we can change the name of the column for a existing table?
Latest Answer: The Column Can be changed by using the following commandsp_rename 'Tablename.OldColumnname', 'new columnname', 'COLUMN'The sp_rename factor and the 'COLUMN' string ...
How to calculate the time variation between two different time sessions?
Latest Answer: select t1- t2 from dualwhere t1 and t2 are dates then this query will return no of day not hrs.Sudhir Sorout ...
This is one of the questions I have on my interview exam. It is a take home exam and I have not learned SQL but the employers want to know my know my skills to find answers using any means possible. Question:
Latest Answer: Use of distinct, not in keywords make this code altogether complicated. But what I discern from this code 'catch' lies in FULL OUTER JOIN since it retreives all the data including your null values.The union here returns the cross product of query mentioned ...
View page << Previous 1 [2] 3 4 5 6 7 8 9 10 Next >>

Go Top