MySQL Basics Practice Test: SQL Syntax — Flashcards | Databases | FatSkills

MySQL Basics Practice Test: SQL Syntax — Flashcards

Fast review mode: answers are shown by default so you can skim quickly. Hide them if you want to self-test.

Quiz on SQL statement syntax, compound statement and comment syntax.

SQL syntax is a set of rules and guidelines that define how to perform actions on data in a database. SQL statements must start with a keyword, and all end with a semicolon. SQL is case insensitive, so SELECT and Select have the same meaning. 

Here are some examples of SQL statements:
SELECT:
Reads data from the database and displays it to the user
UPDATE: Modifies data in the database
DELETE: Deletes data from the database
CREATE DATABASE: Creates a database
USE: Changes the current location to the required database
DROP DATABASE: Deletes a database 

SQL commands are made up of tokens that can be literals, keywords, identifiers, or expressions. Tokens are separated by space, tabs, or newlines. 

Here are some common SQL clauses:
FROM:
Identifies the specific table or tables containing the fields specified in the SELECT clause
IN: Allows you to specify multiple values in a WHERE clause 

SQL syntax notation includes:
Curly brackets:
Enclose two or more required alternative choices, separated by vertical bars
Square brackets: Indicate an optional element or clause
Vertical bars: Separate two or more alternative syntax element

1 of 27 Ready
Which statement upgrades the database directory name encoding?
ALTER DATABASE
Shortcuts
Prev Space Show / hide Next
Turn this into a study set.
Sign in with Google to save tricky questions to your reminder list and resume on any device.
Sign in with Google Free • no extra password