What does SQL stand for? (A) Structured Question Language (B) Strong Question Language (C) Structured Query Language
Which SQL statement is used to extract data from a database? (A) SELECT (B) GET (C) EXTRACT (D) OPEN
Which SQL statement is used to update data in a database? (A) MODIFY (B) UPDATE (C) SAVE (D) SAVE AS
Which SQL statement is used to delete data from a database? (A) COLLAPSE (B) DELETE (C) REMOVE
Which SQL statement is used to insert new data in a database? (A) INSERT INTO (B) INSERT NEW (C) ADD NEW (D) ADD RECORD
With SQL, how do you select a column named "FirstName" from a table named "Persons"? (A) SELECT FirstName FROM Persons (B) EXTRACT FirstName FROM Persons (C) SELECT Persons.FirstName
With SQL, how do you select all the columns from a table named "Persons"? (A) SELECT Persons (B) SELECT *.Persons (C) SELECT * FROM Persons (D) SELECT [all] FROM Persons
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<>'Peter' (C) SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter' (D) SELECT * FROM Persons WHERE FirstName='Peter' Correct answer
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 LIKE '%a' (B) SELECT * FROM Persons WHERE FirstName LIKE 'a%' (C) SELECT * FROM Persons WHERE FirstName='a' (D) SELECT * FROM Persons WHERE FirstName='%a%'
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) False (B) True
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 FirstName='Peter', LastName='Jackson' FROM Persons (B) SELECT * FROM Persons WHERE FirstName<>'Peter' AND LastName<>'Jackson' (C) SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson'
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 SELECT * FROM Persons WHERE LastName>'Hansen' AND LastName<'Pettersen'< /p>
Which SQL statement is used to return only different values? (A) SELECT DISTINCT (B) SELECT DIFFERENT (C) SELECT UNIQUE
Which SQL keyword is used to sort the result-set? (A) ORDER BY (B) SORT BY (C) SORT (D) ORDER
With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"? (A) SELECT * FROM Persons SORT 'FirstName' DESC (B) SELECT * FROM Persons ORDER FirstName DESC (C) SELECT * FROM Persons ORDER BY FirstName DESC (D) SELECT * FROM Persons SORT BY 'FirstName' DESC
With SQL, how can you insert a new record into the "Persons" table? (A) INSERT VALUES ('Jimmy', 'Jackson') INTO Persons (B) INSERT ('Jimmy', 'Jackson') INTO Persons (C) INSERT INTO Persons VALUES ('Jimmy', 'Jackson')
With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table? (A) INSERT ('Olsen') INTO Persons (LastName) (B) INSERT INTO Persons (LastName) VALUES ('Olsen') (C) INSERT INTO Persons ('Olsen') INTO LastName
How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table? (A) UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen' (B) MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen' (C) UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen' (D) MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen
With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table? (A) DELETE ROW FirstName='Peter' FROM Persons (B) DELETE FROM Persons WHERE FirstName = 'Peter' (C) DELETE FirstName='Peter' FROM Persons
With SQL, how can you return the number of records in the "Persons" table? (A) SELECT NO(*) FROM Persons (B) SELECT COLUMNS(*) FROM Persons (C) SELECT COUNT(*) FROM Persons (D) SELECT LEN(*) FROM Persons
What is the most common type of join? (A) INNER JOIN (B) JOINED TABLE (C) INSIDE JOIN (D) JOINED
Which operator is used to select values within a range? (A) BETWEEN (B) WITHIN (C) RANGE
The NOT NULL constraint enforces a column to not accept NULL values. False True
Which operator is used to search for a specified pattern in a column? (A) FROM (B) LIKE (C) GET
Which SQL statement is used to create a database table called 'Customers'? (A) CREATE DB Customers (B) CREATE DATABASE TAB Customers (C) CREATE TABLE Customers (D) CREATE DATABASE TABLE Customers