SQL

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

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 B. False

A

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='Peter' AND LastName='Jackson' B. SELECT * FROM Persons WHERE FirstName<>'Peter' AND LastName<>'Jackson' C. SELECT FirstName='Peter', LastName='Jackson' FROM Persons

A

15. With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"? A. SELECT * FROM Persons ORDER BY FirstName DESC B. SELECT * FROM Persons SORT 'FirstName' DESC C. SELECT * FROM Persons ORDER FirstName DESC D. SELECT * FROM Persons SORT BY 'FirstName' DESC

A

16. With SQL, how can you insert a new record into the "Persons" table? A. INSERT INTO Persons VALUES ('Jimmy', 'Jackson') B. INSERT VALUES ('Jimmy', 'Jackson') INTO Persons C. INSERT ('Jimmy', 'Jackson') INTO Persons

A

17. With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table? A. INSERT INTO Persons (LastName) VALUES ('Olsen') B. INSERT INTO Persons ('Olsen') INTO LastName C. INSERT ('Olsen') INTO Persons (LastName)

A

19. With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table? A. DELETE FROM Persons WHERE FirstName = 'Peter' B. DELETE FirstName='Peter' FROM Persons C. DELETE ROW FirstName='Peter' FROM Persons

A

3. Which SQL statement is used to update data in a database? A. UPDATE B. SAVE C. MODIFY D. SAVE AS

A

4. Which SQL statement is used to delete data from a database? A. DELETE B. COLLAPSE C. REMOVE

A

1. What does SQL stand for? A. Strong Question Language B. Structured Query Language C. Structured Question Language

B

18. How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table? A. UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen' B. UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen' C. MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen' D. MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen

B

22. Which operator is used to select values within a range? A. WITHIN B. BETWEEN C. RANGE

B

23. The NOT NULL constraint enforces a column to not accept null values. A. False B. True

B

24. Which operator is used to search for a specified pattern in a column? A. FROM B. LIKE C. GET

B

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 C. SELECT Persons.FirstName

B

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 LIKE 'Peter' B. SELECT * FROM Persons WHERE FirstName='Peter' C. SELECT * FROM Persons WHERE FirstName<>'Peter' D. SELECT [all] FROM Persons WHERE FirstName='Peter'

B

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 LIKE '%a' D. SELECT * FROM Persons WHERE FirstName='a'

B

14. Which SQL keyword is used to sort the result-set? A. SORT BY B. SORT C. ORDER BY D. ORDER

C

2. Which SQL statement is used to extract data from a database? A. OPEN B. GET C. SELECT D. EXTRACT

C

5. Which SQL statement is used to insert new data in a database? A. INSERT NEW B. ADD RECORD C. INSERT INTO D. ADD NEW

C

7. With SQL, how do you select all the columns from a table named "Persons"? A. SELECT Persons B. SELECT [all] FROM Persons C. SELECT * FROM Persons D. SELECT *.Persons

C

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 C. SELECT COLUMNS(*) FROM Persons D. SELECT COUNT(*) FROM Persons

D

21. What is the most common type of join? A. INSIDE JOIN B. JOINED C. JOINED TABLE D. INNER JOIN

D

25. Which SQL statement is used to create a table in a database? A. CREATE DATABASE TAB B. CREATE DB C. CREATE DATABASE TABLE D. CREATE TABLE

D

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 * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen' B. SELECT LastName>'Hansen' AND LastName<'Pettersen' FROM Persons C. SELECT * FROM Persons WHERE LastName>'Hansen' AND LastName<'Pettersen'

A

13. Which SQL statement is used to return only different values? A. SELECT DISTINCT B. SELECT DIFFERENT C. SELECT UNIQUE

A


Kaugnay na mga set ng pag-aaral

Anatomy Chapter 5. Integumentary system

View Set

ATI - The Cardiovascular System Test

View Set

Level 3 Exam 1 Ch. 14 Developmentally Appropriate Nursing Care Across Care Settings

View Set

Chapter 12 Adaptive Reading Assignment

View Set

Chapter 8: The Labor Market: Workers, Wages, and Unemployment

View Set

Ch. 11: Monopolistic Competition and Oligopoly

View Set

Chapter 1 SB - What is marketing

View Set