SQL Basic Questions and Answers

SQL MCQs : This section focuses on the "Basics" of the SQL. These Multiple Choice Questions (mcq) should be practiced to improve the SQL skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exam and other competitive examinations.

1. Which one of the following is used to define the structure of the relation ,deleting relations and relating schemas ?

A. DML(Data Manipulation Langauge)
B. DDL(Data Definition Langauge)
C. Query
D. Relational Schema

View Answer


2. Create table student(name varchar ,id integer) What type of statement is this ?

A. DML
B. DDL
C. DCL
D. TCL

View Answer


3. The basic data type char(n) is a _____ length character string and varchar(n) is _____ length character.

A. Fixed, equal
B. Fixed, variable
C. Equal, variable
D. Variable, equal

View Answer


4. To remove a relation from an SQL database, we use the ______ command.

A. Delete
B. Purge
C. Drop table
D. Remove

View Answer


5. Insert into Business values (10211, "Jhon", "Chemist", 66000); What type of statement is this ?

A. Query
B. DML
C. Relational
D. DDL

View Answer


6.  Updates that violate __________ are disallowed .

A. Integrity constraints
B. Transaction control
C. Authorization
D. DDL constraints

View Answer


7. Aggregate functions can be used in the select list or the_______clause of a select statement or subquery. They cannot be used in a ______ clause.

A. Having, where
B. Group by, having
C. Group by, where
D. Where, having

View Answer


8. Which of the following creates temporary relation for the query on which it is defined

A. With
B. From
C. Where
D. Select

View Answer


9. Subqueries cannot:

A. Appear in select, update, delete, insert statements.
B. Retrieve data from a table different from the one in the outer query
C. Join tables
D. Use group by or group functions

View Answer


10. Which of the following is not a aggregate function ?

A. With
B. Avg
C. Sum
D. Min

View Answer


11. How can you find rows that do not match some specified condition?

A. EXISTS
B. Double use of NOT EXISTS
C. NOT EXISTS
D. None of the mentioned is correct.

View Answer


12.  A Database Management System is

A. Collection of interrelated data
B. Collection of programs to access data
C. Collection of programs
D. None of the mentioned is correct.

View Answer


13. DBMS is an interface between

A. Database and User
B. Database application and database
C. Database and SQL
D. Data and Database

View Answer


14. Which of the following is not disadvantages of file system to store data?

A. Data redundancy and inconsistency
B. Difficulty in accessing data
C. Data isolation is not present
D. High Cost

View Answer


15. Which of the following is an advantage of database management approach?

A. Data is dependent on programs
B. Data redundancy increases
C. Data can be accessed by multiple programs
D. Multiple users cannot access data concurrently

View Answer


16. Which of the following is not a features provided by DBMS?

A. Maintain accuracy of data
B. Utilities for performance analysis and logging
C. Ensure modifications are successful or not done at all
D. Recovery mechanism for data

View Answer


17. The attribute value that is currently unknown is

A. 0
B. -1
C. NULL
D. "

View Answer


18.  A relational database consists of a collection of

A. Table
B. Record
C. Fields
D. Attributes

View Answer


19. A relationship among a set of values in a table is represented by a

A. Relation
B. Column
C. Row
D. Attributes

View Answer


20. The set of permitted values of an attribute is called

A. Tuple
B. Domain
C. Column
D. Table

View Answer





Also check :


Discussion



* You must be logged in to add comment.