2. Selecting, Updating and Deleting Data Flashcards
To sort data, you must use which clause?
ORDER BY
The result set defaults to displaying data in what order?
Ascending order.
What statement is used to display a result set, to the opposite of ascending order?
DESC
What is a result set?
The result of a select statement which is stored in a result table.
Which character is used to close/complete a statement?
Semi colon or ;
What are some examples of Comparison Operators?
> Greater than= Greater than or equal to Not equal to
What is an AND operator used for?
…
What is an OR operator used for?
…
To search or retrieve data you must use which statement?
The SELECT statement.
Give an example of a statement which would allow you to search for ..
…
The data in a table can be removed using which statement?
The ‘DELETE’ statement.
Why should you be careful when not using a WHERE clause in a delete statement?
If you don’t specify which row or column you wish to delete, then the whole table can be deleted.
True or false, does a DELETE statement require a WHERE condition?
False.
What statement allows you to add new data to the table?
INSERT
Give an example of a query which will allow you to add new data to specific columns.
INSERT INTO table (column)VALUES (value1)