-
-
-
There is a Eno & gender in a table. Eno has primary key and gender has a check constraints for the values 'M' and 'F'. While inserting the data into the table M was misspelled as F and F as M. What is the update statement to replace F with M and M with F?
CREATE TABLE temp(eno NUMBER CONSTRAINTS pk_eno PRIMARY KEY,gender CHAR(1) CHECK (gender IN( 'M','F')));INSERT INTO temp VALUES ('01','M');INSERT INTO temp VALUES ('02','M');INSERT INTO temp VALUES ('03','F');INSERT INTO temp VALUES ('04','M');INSERT INTO temp VALUES ('05','M');INSERT INTO temp VALUES ('06','F');INSERT INTO temp VALUES ('07','M');INSERT INTO temp VALUES ('08','F');COMMIT;UPDATE temp...
-
-
-
-
-
How do you subtract two columns in oracle database
How do you subtract two columns in oracle database, two columns are in data format.Example : inserttime column senttime column?
-
Delete distinct name from table
How could i delete the distinct name from the table. the rest record would be available as it is in the table?
-
-
-
-
Loading Huge data files to Oracle
What is the process that we use to load the data faster when there are millions of files?
-
-
-
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 Interview Questions
Ans