-
-
-
-
TRUNCATE TABLE EMP;,DELETE FROM EMP;, Will the outputs of the above two commands?
Both will result in deleting all the rows in the table EMP.Answered by Scott on 2005-05-12 10:31:58: The difference is that the TRUNCATE call cannot be rolled back and all memory space for that table is released back to the server. TRUNCATE is much faster than DELETE and in both cases only the table data is removed, not the table structure.
-
-
-
SQL Query to return only duplicate rows and count
I have a table with duplicate names in it. Write me a query which returns only duplicate rows with number of times they are repeated?
-
Single Row Function
Display details of employees having same char at the star and end postition of their namelike abishikathis name have last character and first character is same
-
Import & Export Through OEM & SQL
Can any one guide me how can i import and export schema using SQL and OEM
-
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...
-
What is the use of CASCADE CONSTRAINTS?
When this clause is used with the DROP command, a parent table can be dropped even when a child table exists.
-
Correlated sub-query and nested sub-query examples
Please give some sub-query examples based on correlated sub-query and nested
-
Command to show SQL commands from buffer
Which command displays the SQL command in the SQL buffer, and then executes it?
-
Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?
Data Definition Language (DDL)
-
Pairwise and Non-Pairwise Comparisons
Explain the difference between pairwise and non-pairwise comparisons in multiple column sub-queries.
-
-
Recent row entered
I have a very unusual question, how can one check which is the recent row added to a table?
-
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?
-
-
To access Excel data into sql
Dear All,Suppose i have Excel table and within that i have some records. Please tell me the SQL query so that i can create table and populate the Excel sheet data
SQL Interview Questions
Ans