Sql interview questions and answers for freshers pdf

Advertisements


SQL is not itself a database management system, nor is it a stand-alone product. You cannot go into a computer store and “buy SQL”. Then….

What is sql?

Structured Query Language (SQL) is a language that provides an interface to relational database systems. SQL was developed by IBM in the 1970s for use in System R, and is a de facto standard, as well as an ISO and ANSI standard. SQL is often pronounced SEQUEL.

In common usage SQL also encompasses

DML (Data Manipulation Language), for INSERTs, UPDATEs, DELETEs and DDL (Data Definition Language), used for creating and modifying tables and other database structures.

The development of SQL is governed by standards. A major revision to the SQL standard was completed in 1992, called SQL2. SQL3 support object extensions and are (partially?) implemented in Oracle8 and 9.

Sql interview questions:

1. Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?
Data Definition Language (DDL)

2. What operator performs pattern matching?
LIKE operator

3. What operator tests column for the absence of data?
IS NULL operator

4. Which command executes the contents of a specified file?
START <filename> or @<filename>

5. What is the parameter substitution symbol used with INSERT INTO command?
&

6. Which command displays the SQL command in the SQL buffer, and then executes it?
RUN

7. What are the wildcards used for pattern matching?
_ for single character substitution and % for multi-character substitution

8. State true or false. EXISTS, SOME, ANY are operators in SQL.
True

9. State true or false. !=, <>, ^= all denote the same operation.
True

10. What are the privileges that can be granted on a table by a user to others?
Insert, update, delete, select, references, index, execute, alter, all

11. What command is used to get back the privileges offered by the GRANT command?
REVOKE

12. Which system tables contain information on privileges granted and privileges obtained?
USER_TAB_PRIVS_MADE, USER_TAB_PRIVS_RECD

13. Which system table contains information on constraints on all the tables created?
USER_CONSTRAINTS

14. TRUNCATE TABLE EMP;
DELETE FROM EMP;
Will the outputs of the above two commands differ?
Both will result in deleting all the rows in the table EMP.

15. 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.

16. What command is used to create a table by copying the structure of another table?
Answer :
CREATE TABLE .. AS SELECT command
Explanation :
To copy only the structure, the WHERE clause of the SELECT command should contain a FALSE statement as in the following.
CREATE TABLE NEWTABLE AS SELECT * FROM EXISTINGTABLE WHERE 1=2;
If the WHERE condition is true, then all the rows or rows satisfying the condition will be copied to the new table.

Download more sql questions and answers:

SQL-interview questions-1

SQL interview questions and answers -2

sql -RDBMS interview questions-3

For More Interview Questions and Answers please add me to your circles at Google Plus by clicking g-plus

Advertisements


17 thoughts on “Sql interview questions and answers for freshers pdf

  1. please send me sql question and answers to my mail.

  2. Dear Sir,
    Please send the fresher interview questions on SQL

    Regards
    Yeshwanth

  3. Dhananjay kumar says:

    sir,
    please send me interview question for fresher.
    regards
    dhananjay

  4. send me some sql interview questions

  5. Rahul Chaudhry says:

    Hello Sir,
    Please send me freshers interview question On oracle sql

    regards
    Rahul Chaudhary

  6. venkatakrishnan says:

    Hi please send me sql question and answer my mail id

  7. plz sir
    send me answer
    for fresher interview question and answer

    thanxxxx
    alll

  8. plz send me slq interview question

  9. plz send sql interview question

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>