SQL SQLObjective type Questions


1.       What does SQL stand for?
a.         Structured Query Language
b.         Structured Question Language
c.         Strong Question Language
Ans: a. Structured Query Language

2.       Which SQL statement is used to extract data from a database?
a.         GET
b.         OPEN
c.         EXTRACT
d.         SELECT
Ans: c. EXTRACT

3.       Which SQL statement is used to update data in a database?
a.         SAVE AS
b.         UPDATE
c.         SAVE
d.         MODIFY
Ans: b. UPDATE

4.       Which SQL statement is used to delete data from a database?
a.         COLLAPSE
b.         DELETE
c.         REMOVE
Ans: b. DELETE

5.       Key to represent relationship between tables is called
a.         Primary key
b.         Secondary Key
c.         Foreign Key
d.         None of these
Ans: C Foreign Key

6.       With SQL, how do you select a column named “FirstName” from a table named “Persons”?
a.         SELECT FirstName FROM Persons
b.         SELECT Persons.FirstName
c.         EXTRACT FirstName FROM Persons
Ans: a. SELECT FirstName FROM Persons
7.       Which of the following is a valid SQL type?
a.         CHARACTER
b.         NUMERIC
c.         FLOAT
d.         All of the above
Ans: D  All of the above

8.       With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” is “Peter”?
a.         SELECT * FROM Persons WHERE FirstName=’Peter’
b.         SELECT [all] FROM Persons WHERE FirstName=’Peter’
c.         SELECT [all] FROM Persons WHERE FirstName LIKE ‘Peter’
d.         SELECT * FROM Persons WHERE FirstName<>‘Peter’
Ans: a. SELECT * FROM Persons WHERE FirstName=’Peter’

9.       With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” starts with an “a”?
a.         SELECT * FROM Persons WHERE FirstName=’%a%’
b.         SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
c.         SELECT * FROM Persons WHERE FirstName=’a’
d.         SELECT * FROM Persons WHERE FirstName LIKE ‘%a’
Ans: d. SELECT * FROM Persons WHERE FirstName LIKE ‘%a’

10.       DML is provided for
a.       Description of logical structure of database.
b.      Addition of new structures in the database system.
c.       Manipulation & processing of database.
d.      Definition of physical structure of database system.

Ans: c  DML is provided for manipulation & processing of database.


Click Below Link for More

SQLObjective type Question and Answers Set 1