Search Header Logo

MySQL Basic Syntax (Reviewer)

Authored by JOSEPH ALMONTE

Computers

10th Grade

Used 10+ times

MySQL Basic Syntax (Reviewer)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

With MySQL, how do you select a column named "FirstName" from a table named "Persons"?

SELECT Persons.FirstName

EXTRACT FirstName FROM Persons

SELECT FirstName FROM Persons  

SELECT * FROM Persons

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

With MySQL, how do you select all the columns from a table named "Persons"?

SELECT *.Persons

SELECT [all] FROM Persons

SELECT * FROM Persons  

SELECT Column Persons

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

With MySQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?

SELECT [all] FROM Persons WHERE FirstName='Peter'

SELECT * FROM Persons WHERE FirstName<>'Peter'

SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter'

SELECT * FROM Persons WHERE FirstName='Peter'  

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

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"?

SELECT * FROM Persons WHERE FirstName='%a%'

SELECT * FROM Persons WHERE FirstName='a'

SELECT * FROM Persons WHERE FirstName LIKE 'a%'  

SELECT * FROM Persons WHERE FirstName LIKE '%a'

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

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"?

SELECT LastName>'Hansen' AND LastName<'Pettersen' FROM Persons

SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen'

SELECT * FROM Persons WHERE LastName>'Hansen' AND LastName<'Pettersen'

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

With MySQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?

SELECT * FROM Persons SORT 'FirstName' DESC

SELECT * FROM Persons ORDER FirstName DESC

SELECT * FROM Persons SORT BY 'FirstName' DESC

SELECT * FROM Persons ORDER BY FirstName DESC 

7.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

With MySQL, how can you insert a new record into the "Persons" table?

INSERT VALUES ('Jimmy', 'Jackson') INTO Persons

INSERT INTO Persons VALUES ('Jimmy', 'Jackson')  

INSERT ('Jimmy', 'Jackson') INTO Persons

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?