Gadgets 4 Students Career Guide Free Tutorials  Go to Your University  Placement Preparation 
0 like 0 dislike
51.1k views
in Technical Questions by Goeduhub's Expert (5.8k points)
MCQ's Questions on SQL along with answers

2 Answers

0 like 0 dislike
by Goeduhub's Expert (5.8k points)
edited by
 
Best answer

SQL MCQ's Question Set 1

Q.1. Which statement is wrong about PRIMARY KEY constraint in SQL?

  1. The PRIMARY KEY uniquely identifies each record in a SQL database table
  2. Primary key can be made based on multiple columns
  3. Primary key must be made of any single columns
  4. Primary keys must contain UNIQUE values.

Answer:- (3)


Q.2.  SQL Query to delete all rows in a table without deleting the table (structure, attributes, and indexes)

  1. DELETE FROM table_name;
  2. DELETE TABLE table_name;
  3. DROP TABLE table_name;
  4. NONE

Answer:- (1)


Master SQL from UDACITY


Q.3. If we want to allow age of a person > 18 in the column Age of table Person, then which constraint will be applied to AGE column.

  1. Default
  2. Check
  3. NOT NULL
  4. None

Answer:- (2)


Q.4. In a table, a column contains duplicate value, if you want to list all different value only, then which SQL clause is used?

  1. SQL DISTINCT
  2. SQL UNIQUE
  3. SQL BETWEEN
  4. SQL Exists

Answer:- (1)


Q.5. To give a temporary name to a table, or a column in a table for more readability, what is used?

  1. SQL Wildcards
  2. SQL aliases
  3. SQL LIKES
  4. SQL Comments

Answer:- (2)


Q.6. What does below SQL statement describe?

SELECT CustomerName, Address + ‘, ‘ + City + ‘, ‘ + Country AS Address

FROM Customers;

  1. Alias named Address column will be created and under this Address, City and Country will be printed as combined statement.
  2. Alias named Address will be created for Country columns
  3. Alias named Address column will be created and under this all CustomerName, address, city and country will be printed as combined statement
  4. All above options are wrong.

Answer:- (1)


Q.7. Logical operators used in SQL are

  1. AND, OR , NOT
  2. &&, ||, !
  3. $,|,!
  4. None of the above

Answer:- (1)


Q.8. To specify the number of records to return, which keyword is used

  1. FIRST
  2. TOP
  3. START
  4. ROW

Answer:- (2)


Q.9.  To search for a specified pattern in a column

  1. SQL MATCH
  2. SQL LIKE
  3. SQL PATTERN
  4. SQL SEARCH

Answer:- (2)


Q.10. To combine the result-set of two or more SELECT statements, SQL clause used is

  1. SQL UNION
  2. SQL JOIN
  3. SQL GROUP BY
  4. NONE

Answer:- (1)


Q.11. Which is called as a virtual table in SQL?

  1. INNER JOIN
  2. JOIN
  3. VIEW
  4. NONE

Answer:- (3)


Q.12. Syntax to create stored procedure is/are

  1. CREATE PROCEDURE procedureName AS
    SQL statements

  2. CREATE PROCEDURE procedureName AS
    BEGIN
    SQL statements
    END

  3. CREATE PROC procedureName AS
    BEGIN
    SQL statements
    END

  4. (2) and (3)

  5. (2) only

Answer:- (4)


Q.13. Which statement(S) is/are incorrect

  1. Stored procedure may return a value and function must return a value.
  2. Function has only IN parameter.
  3. Try and Catch can be used with both stored procedure and function.
  4. Stored procedure has IN and OUT parameter.

Answer:- (3)


Q.14. The SQL join which does Cartesian product is called?

  1. Left Join
  2. Left Outer Join
  3. Right Outer Join
  4. Cross Join

Answer:- (4)


Q.15. Match SQL language with SQL commands

1)DDL    i)Revok, Grant
2)DML   ii)rename a table
3)TCL    iii)insert, update
4)DCL    iv)rollback , commit

  1. 1-iii,2-i,3-ii,4-iv
  2. 1-iii,2-ii,3-iv,4-i
  3. 1-ii,2-iii,3-iv,4-i*
  4. 1-i,2-iii,3-ii,4-iv

Answer:- (3)


SQL MCQ's Question Set 2

For more Technical MCQ's and Interview Questions Click here

0 like 0 dislike
by Goeduhub's Expert (9.3k points)
edited by

Learn & Improve In-Demand Data Skills Online in this Summer With  These High Quality Courses[Recommended by GOEDUHUB]:-

Best Data Science Online Courses[Lists] on:-

Claim your 10 Days FREE Trial for Pluralsight.

Best Data Science Courses on Datacamp
Best Data Science Courses on Coursera
Best Data Science Courses on Udemy
Best Data Science Courses on Pluralsight
Best Data Science Courses & Microdegrees on Udacity
Best Artificial Intelligence[AI] Courses on Coursera
Best Machine Learning[ML] Courses on Coursera
Best Python Programming Courses on Coursera
Best Artificial Intelligence[AI] Courses on Udemy
Best Python Programming Courses on Udemy

Related questions

0 like 0 dislike
2 answers 9.5k views
0 like 0 dislike
2 answers 48.7k views
0 like 0 dislike
2 answers 100.0k views
0 like 0 dislike
2 answers 27.3k views

 Important Lists:

Important Lists, Exams & Cutoffs Exams after Graduation PSUs

 Goeduhub:

About Us | Contact Us || Terms & Conditions | Privacy Policy || Youtube Channel || Telegram Channel © goeduhub.com Social::   |  | 

 

Free Online Directory
...