-
-
How to delete identical row from a table?
how to delete identical row from a table?
if we have 4 row and two of them having same data then how we delete identical row using delete query -
How To Copy Data From One Table to Another Table Having Data
If i have two table T1 having data of column C1,C2,C3 and C4 and T2 having data of column C5,C6,C7 and C8,How to copy Data of T2 to T1 or T1 to T2
-
-
Reverse Duplicate
How to delete reverse duplicate in oracle.
e.g i/p
col1 col2
hyd blr
mum del
del blr
blr hyd
blr del
i want in o/p
col1 col2
hyd blr
mum del
del blr -
Query to Display Employee Hike Details
EID ENAME SAL SALMONTH
101 xyz 100 Jan 2015
101 xyz 200 Feb 2015
102 Abc 300 Feb 2015
I want output like this
Eid Ename hike
101 xyz 100
102 Abc 0 -
SQL to retrieve the 5th record only
My Question is :
I have one table , from this table I have 1000 records. Particularly I need retrieve the 5th record only.
no need retrieve 1 to 4th only 5th record only I need retrieve by using SQL Query? -
Retreive data from 2 tables
I have 2 tables. Table A and Table B. I want to display all the rows from both the tables. can anyone help me on this??
-
Ascending Order and Descending Order Query
How to write a query to list the items in ascending order of Name and within Name, in descending order of Salary
-
Display Column as Rows
There is a table T with two columns C1 and C2.
The data is as below:
C1 C2
1 4
2 5
3 6
display the result as :
1 2 3
4 5 6 -
How to list employees names hired AFTER a certain date
I need to list the employees hired after any random date, lets say 10th December 2010 in ascending order and minus their salary by 100% how would I do this?
-
What is the use of DESC in SQL?
Answer :DESC has two purposes. It is used to describe a schema as well as to retrieve rows from table in descending order.Explanation : The query SELECT * FROM EMP ORDER BY ENAME DESC will display the output sorted on ENAME in descending order.
-
What is the output of the following query?
SELECT TRUNC(1234.5678,-2) FROM DUAL;1200
-
What operator performs pattern matching?
LIKE operator
-
What is the difference between TRUNCATE and DELETE commands?
TRUNCATE is a DDL command whereas DELETE is a DML command. Hence DELETE operation can be rolled back, but TRUNCATE operation cannot be rolled back. WHERE clause can be used with DELETE and not with TRUNCATE.
-
-
-
-
-
SQL Interview Questions
Ans