Home

MySQL Online Question

What is MySQL? (A) A relational database management system (B) Cross-platform, open-source and free (C) Developed, distributed, and supported by Oracle Corporation (D) All the options are correct

Which MySQL statement is used to select data from a database? (A) GET (B) OPEN (C) EXTRACT (D) SELECT

Which MySQL statement is used to update data in a database? (A) SAVE (B) INSERT (C) MODIFY (D) UPDATE

Which MySQL statement is used to delete data from a database? (A) COLLAPSE (B) DELETE (C) REMOVE

Which MYSQL statement is used to insert new data in a database? (A) INSERT NEW (B) ADD NEW (C) INSERT INTO (D) ADD RECORD

With MySQL, how do you select a column named "FirstName" from a table named "Persons"? (A) SELECT Persons.FirstName (B) EXTRACT FirstName FROM Persons (C) SELECT FirstName FROM Persons

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

With MySQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"? (A) SELECT * FROM Persons WHERE FirstName='Peter' (B) SELECT * FROM Persons WHERE FirstName< >'Peter' (C) SELECT [all] FROM Persons WHERE FirstName='Peter' (D) SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter'

With MySQL, 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%'

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

MySQL Online Question

With MySQL, 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

With MySQL, 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' (C) SELECT * FROM Persons WHERE LastName>'Hansen' AND LastName<'Pettersen'

Which MySQL statement is used to return only different values? (A) SELECT UNIQUE (B) SELECT DISTINCT (C) SELECT DIFFERENT

Which MySQL keyword is used to sort the result-set? (A) ORDER BY (B) ORDER (C) SORT (D) SORT BY

With MySQL, 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 MySQL, 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 MySQL, how can you insert "Olsen" as the "LastName" in the "Persons" table? (A) INSERT INTO Persons ('Olsen') INTO LastName (B) INSERT INTO Persons (LastName) VALUES ('Olsen') (C) INSERT ('Olsen') INTO Persons (LastName)

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) MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen' (C) MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen (D) UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'

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

With MySQL, how can you return the number of records in the "Persons" table? (A) SELECT NO(*) FROM Persons (B) SELECT COLUMNS(*) FROM Persons (C) SELECT LEN(*) FROM Persons (D) SELECT COUNT(*) FROM Persons

MySQL Online Question

What are the supported types of joins in MySQL? (A) INNER JOIN, LEFT JOIN, RIGHT JOIN, CROSS JOIN (B) INNER JOIN, OUTER JOIN, LEFT JOIN, RIGHT JOIN (C) INNER JOIN, OUTER , LEFT JOIN, RIGHT JOIN

Which operator is used to select values within a given range? (A) IN (B) UNION (C) BETWEEN (D) RANGE

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

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

Which MySQL statement is used to create a database table called 'Customers'? (A) CREATE DATABASE TABLE Customers (B) CREATE DB Customers (C) CREATE TABLE Customers (D) CREATE DATABASE TAB Customers