Sort Work of SQL
is Structured Query Language, today i am sharing with you of oDesk SQL
Test Answers and questions as well as, hope you will get good score using this
questions and Answers.
Odesk SQL Test Questions and Answers
Question: 1
1. What does SQL stand
for?
A) Strong Question Language
B) Structurd Question Language
C) Structured Query Language (Answer)
A) Strong Question Language
B) Structurd Question Language
C) Structured Query Language (Answer)
Which SQL statement is used
to extract data from a database?
A) GET
B) OPEN
C) EXTRACT
D) QUERY (Answer)
Question: 3
A) GET
B) OPEN
C) EXTRACT
D) QUERY (Answer)
Question: 3
Which SQL statement is used
to update data in a database?
A) UPDATE (Answer)
B) SAVE AS
C) MODIFY
D) SAVE
Question: 4
A) UPDATE (Answer)
B) SAVE AS
C) MODIFY
D) SAVE
Question: 4
Which SQL statement is used
to delete data from a database?
A) TRUNCATE
B) DELETE (Answer)
C) REMOVE
Question: 5
A) TRUNCATE
B) DELETE (Answer)
C) REMOVE
Question: 5
Which SQL statement is used
to insert new data in a database?
A) ADD RECORD
B) ADD INTO
C) INSERT (Answer)
D) ADD NEW
Question: 6
A) ADD RECORD
B) ADD INTO
C) INSERT (Answer)
D) ADD NEW
Question: 6
With SQL, how do you select a
column named “FirstName” from a table named “Persons” ?
A) EXTRACT FirstName FROM Persons
B) SELECT FirstName FROM Persons (Answer)
C) SELECT Person.FirstName
Question: 7
A) EXTRACT FirstName FROM Persons
B) SELECT FirstName FROM Persons (Answer)
C) SELECT Person.FirstName
Question: 7
With SQL, how do you select
all the columns from a tab!
A) SELECT [all] FROM Persons
B) SELECT All Persons
C) SELECT *Persons
D) SELECT *FROMPersons (Answer)
Question: 8
A) SELECT [all] FROM Persons
B) SELECT All Persons
C) SELECT *Persons
D) SELECT *FROMPersons (Answer)
Question: 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 [all] FROM Persons WHERE FirstName=’Peter’
B) SELECT *FROM Persons WHERE FirstName LIKE ‘Peter’
C) SELECT [all] FROM Persons WHERE FirstName LIKE’Peter’
D) SELECT *FROMPersons WHERE FirstName=’Peter’ (Answer)
Question: 9
A) SELECT [all] FROM Persons WHERE FirstName=’Peter’
B) SELECT *FROM Persons WHERE FirstName LIKE ‘Peter’
C) SELECT [all] FROM Persons WHERE FirstName LIKE’Peter’
D) SELECT *FROMPersons WHERE FirstName=’Peter’ (Answer)
Question: 9
With SQL, how do you select
all the records from a table named “Persons” where the value of the column
“FirstName” stars with an “a” ?
A)SELECT *FROM Persons WHERE FirstName =’%%’
B) SELECT *FROM Persons WHERE FirstName LIKE ‘%a’
C) SELECT *FROM Persons WHERE FirstName =’a’
D) SELECT *FROM Persons WHERE FirstName LIKE ‘a%’ (Answer)
E) SELECT *FROM Persons WHERE FirstName =’a’
Question: 10
A)SELECT *FROM Persons WHERE FirstName =’%%’
B) SELECT *FROM Persons WHERE FirstName LIKE ‘%a’
C) SELECT *FROM Persons WHERE FirstName =’a’
D) SELECT *FROM Persons WHERE FirstName LIKE ‘a%’ (Answer)
E) SELECT *FROM Persons WHERE FirstName =’a’
Question: 10
The OR operator displays a
record if ANY conditions listed are true. The AND operator displays a record if
ALL of the conditions listed are true
A) True (Answer)
B) False
Question: 11
A) True (Answer)
B) False
Question: 11
With SQL, how do you select
all the records from a table named “Persons” where the “FirstName” is “Peter”
and the “LastName” is “Jackson” ?
A)SELECT *FROM Persons WHERE FirstName LIKE ‘Peter’ And LastName LIKE ‘Jackson’
B) SELECT *FROM Persons WHERE FirstName =’Peter’ AND LastName=’Jackson’ (Answer)
D) SELECT FirstName=’Peter’, LastName=’Jackson’ FROM Persons
Question: 12
A)SELECT *FROM Persons WHERE FirstName LIKE ‘Peter’ And LastName LIKE ‘Jackson’
B) SELECT *FROM Persons WHERE FirstName =’Peter’ AND LastName=’Jackson’ (Answer)
D) SELECT FirstName=’Peter’, LastName=’Jackson’ FROM Persons
Question: 12
With SQL, how do you select
all the records from a table named “Persons” where the “LastName” is
alphabetically between (and including) “Hansen” and “Pettersen” ?
A) SELECT LastName>’Hansen’ AND LastName<’Pettersen’ FROM Persons
B) SELECT *FROM Persons WHERE LastName BETWEEN ‘Hansen’ AND ‘Pettersen’ (Answer)
C) SELECT *FROM Persons WHERE LastName>’Hansen’ AND LastName<’Pettersen’
Question: 13
A) SELECT LastName>’Hansen’ AND LastName<’Pettersen’ FROM Persons
B) SELECT *FROM Persons WHERE LastName BETWEEN ‘Hansen’ AND ‘Pettersen’ (Answer)
C) SELECT *FROM Persons WHERE LastName>’Hansen’ AND LastName<’Pettersen’
Question: 13
With SQL statement is used to
return only different values?
A) SELECT UNIQUE
B) SELECT IDENTITY
C) SELECT DIFFERENT
D) SELECT DISTINCT (Answer)
Question: 14
A) SELECT UNIQUE
B) SELECT IDENTITY
C) SELECT DIFFERENT
D) SELECT DISTINCT (Answer)
Question: 14
Which SQL Keyword is used to
sort the result-set?
A) SORT BY
B) ORDER
C) ORDER BY (Answer)
D) SORT
Question: 15
A) SORT BY
B) ORDER
C) ORDER BY (Answer)
D) SORT
Question: 15
With SQL, how can you return
all the records from a table named “Persons” stored descending by “FirstName” ?
A) SELECT *FROM Persons SORT BY ‘FirsttName’ DESC
B) SELECT *FROM Persons ORDER BY FirsttName DESC (Answer)
C) SELECT *FROM Persons ORDER FirstName DESC
D) SELECT *FROM Persons SORT ‘FirsttName’ DESC
Question: 16
A) SELECT *FROM Persons SORT BY ‘FirsttName’ DESC
B) SELECT *FROM Persons ORDER BY FirsttName DESC (Answer)
C) SELECT *FROM Persons ORDER FirstName DESC
D) SELECT *FROM Persons SORT ‘FirsttName’ DESC
Question: 16
With SQL, how can you insert
a new record into the “Persons” table ?
A) INSERT INTO Persons VALUES (‘Jimmy’,'Jackson’) (Answer)
B) INSERT (‘Jimmy’,'Jackson’) INTO Persons
C) INSERT VALUES (‘Jimmy’,'Jackson’) INTO Persons
Question: 17
A) INSERT INTO Persons VALUES (‘Jimmy’,'Jackson’) (Answer)
B) INSERT (‘Jimmy’,'Jackson’) INTO Persons
C) INSERT VALUES (‘Jimmy’,'Jackson’) INTO Persons
Question: 17
With SQL, how can you insert
“Olsen” as the “LastName” in the “Persons” table?
A) INSERT INTO Persons (LastName) VALUES (‘Olsen’) (Answer)
B) INSERT (‘Olsen’) INTO Persons (LastName)
C) INSERT INTO Persons (‘Olsen’) INTO LastName
Question: 18
A) INSERT INTO Persons (LastName) VALUES (‘Olsen’) (Answer)
B) INSERT (‘Olsen’) INTO Persons (LastName)
C) INSERT INTO Persons (‘Olsen’) INTO LastName
Question: 18
How can you change “Nanson”
into “Nilsen” in the “LastName” coloumn in the Persons table ?
A) UPDATE Persons SETLastName=’Hansen’ INTO LastName=’Nilsen’
B) UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’ (Answer)
C) MODIFY Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’
B) MODIFY Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
Question: 19
A) UPDATE Persons SETLastName=’Hansen’ INTO LastName=’Nilsen’
B) UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’ (Answer)
C) MODIFY Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’
B) MODIFY Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
Question: 19
With SQL, how can you delete
the records where the “FirstName” is the “Peter” in the Persons Table?
A) DELETE FROM Persons WHERE FirstName =’Peter’ (Answer)
B) DELETE ROW FirstName=’Peter’ FROM Persons
C) DELETE FirstName=’Peter’ FROM Persons
Question: 20
A) DELETE FROM Persons WHERE FirstName =’Peter’ (Answer)
B) DELETE ROW FirstName=’Peter’ FROM Persons
C) DELETE FirstName=’Peter’ FROM Persons
Question: 20
With SQL, how can you return
the number of records in the “Persons”Table?
A) SELECT COLUMNS() FROM Persons
B) SELECT COUNT(*) FROM Persons (Answer)
C) SELECT COLUMNS(*) FROM Persons
D) SELECT COUNT() FROM Persons
A) SELECT COLUMNS() FROM Persons
B) SELECT COUNT(*) FROM Persons (Answer)
C) SELECT COLUMNS(*) FROM Persons
D) SELECT COUNT() FROM Persons
Question: 21
Given an employees table as
follows: empid name managerid a1 bob NULL b1 jim a1 B2 tom a1 What value will
select count(*) from employees return?
A) 1
B) 2
C) 3 (Answer)
D) none of the above
Question: 22
A) 1
B) 2
C) 3 (Answer)
D) none of the above
Question: 22
The result of a SELECT
statement can contain duplicate rows.
A) True (Answer)
B) False
Question: 23
A) True (Answer)
B) False
Question: 23
Sometimes the expression
“select count(*)” will return fewer rows than the expression “select
count(value)”.
A) True
B) False (Answer)
Question: 24
A) True
B) False (Answer)
Question: 24
What type of lock will deny
users any access to a table?
A) EXPLICIT
B) IMPLICIT
C) EXCLUSIVE (Answer)
D) SHARED
E) READ ONLY
Question: 25
A) EXPLICIT
B) IMPLICIT
C) EXCLUSIVE (Answer)
D) SHARED
E) READ ONLY
Question: 25
Which of the following is the
correct SQL statement to use to remove rows from a table?
A) DROP
B) REMOVE ROW
C) DELETE (Answer)
D) DELETE ROW
Question: 26
A) DROP
B) REMOVE ROW
C) DELETE (Answer)
D) DELETE ROW
Question: 26
The only way to join two
tables is by using standard, ANSI syntax.
A) True
B) False (Answer)
Question: 27
A) True
B) False (Answer)
Question: 27
A NULL value is treated as a
blank or 0
A) True
B) False (Answer)
Question: 28
The left outer join
is one type of outer join. Another one is the.A) True
B) False (Answer)
Question: 28
A) right
B) full
C) right outer
D) full outer
E) all of the above (Answer)
No comments:
Post a Comment