Section 1

Preview this deck

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

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

4 years ago

Date created

Mar 1, 2020

Cards (25)

Section 1

(25 cards)

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

Front

A

Back

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'

Front

B

Back

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)

Front

A

Back

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

Front

C

Back

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

Front

B

Back

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

Front

B

Back

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'

Front

B

Back

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

Front

B

Back

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

Front

D

Back

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

Front

A

Back

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

Front

C

Back

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

Front

D

Back

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

Front

C

Back

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

Front

A

Back

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

Front

A

Back

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

Front

B

Back

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

Front

B

Back

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

Front

A

Back

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

Front

C

Back

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'

Front

A

Back

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

Front

A

Back

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

Front

A

Back

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

Front

A

Back

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

Front

B

Back

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

Front

D

Back