26. Which SQL statement is used to extract data from a database?
• 1. GET
• 2. EXTRACT
• 3. SELECT
• 4. QUERY
27. Which SQL statement is used to delete data from a database?
• 1. TRUNCATE
• 2. DELETE
• 3. REMOVE
28. Which SQL statement is used to insert new data in a database?
• 1. ADD RECORD
• 2. ADD INTO
• 3. INSERT
• 4. ADD NEW
29. With SQL, how do you select all the columns from a table named "Persons"?
• 1. SELECT [all] FROM Persons
• 2. SELECT All Persons
• 3. SELECT *.Persons
• 4. SELECT * FROM Persons
30. 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
• 1. True
• 2. False
31. With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"?
• 1. SELECT * FROM Persons WHERE FirstName LIKE 'Peter' AND LastName LIKE 'Jackson'
• 2. SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson'
• 3. SELECT FirstName='Peter', LastName='Jackson' FROM Persons
32. Which SQL statement is used to return only different values?
• 1. SELECT UNIQUE
• 2. SELECT INDENTITY
• 3. SELECT DIFFERENT
• 4. SELECT DISTINCT
33. Which SQL keyword is used to sort the result-set?
• 1. SORT BY
• 2. ORDER
• 3. ORDER BY
• 4. SORT
34. With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?
• 1. SELECT * FROM Persons SORT BY 'FirstName' DESC
• 2. SELECT * FROM Persons ORDER BY FirstName DESC
• 3. SELECT * FROM Persons ORDER FirstName DESC
• 4. SELECT * FROM Persons SORT 'FirstName' DESC
35. How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?
• 1. UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'
• 2. UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'
• 3. MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen
• 4. MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'
36. With SQL, how can you return the number of records in the "Persons" table?
• 1. SELECT COLUMNS() FROM Persons
• 2. SELECT COUNT(*) FROM Persons
• 3. SELECT COLUMNS(*) FROM Persons
• 4. SELECT COUNT() FROM Persons
37. 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?
• 1. 1
• 2. 2
• 3. 3
• 4. none of the above
38. The result of a SELECT statement can contain duplicate rows.
• 1. True
• 2. False
39. Sometimes the expression "select count(*)" will return fewer rows than the expression "select count(value)".
• 1. True
• 2. False
40. What type of lock will deny users any access to a table?
• 1. EXPLICIT
• 2. IMPLICIT
• 3. EXCLUSIVE
• 4. SHARED
Answer:
25 4
26 3
27 2
28 3
29 4
30 1
31 2
32 4
33 3
34 2
35 2
36 2
37 3
38 1
39 2
40 3
41 2
42 2
43 3
44 2
45 1
Tuesday, February 24, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment