Flashcards in Basics Deck (13)
What is a table schema?
Contains all the relationships between tables excluding data
*useful for testing without importing confidential information
What is used to end a clause/statement?
What is the basic syntax that forms a SELECT statement?
SELECT FROM ;
How do you select multiple things with a SELECT statement?
What can be used to select unique values only in a table?
SELECT DISTINCT FROM ;
What can be used to perform logic on values returned from SELECT?
i.e: SELECT FROM WHERE = ;
What are the operators for a WHERE statement?
!= or <>
How do you reference a string when performing logic with WHERE?
enclose in single quotes
What syntax can be used to count the number of rows returned by a SELECT statement?
SELECT COUNT(*) FROM ;
SELECT COUNT(DISTINCT ) FROM ;
What syntax can be used to limit the number of rows returned by a query?
SELECT FROM LIMIT ;
What is the syntax to order columns returned something in ascending or descending order?
SELECT FROM ORDER BY ;
Why would you ORDER BY for multiple columns?
If the first columns are identical the second ordering will take effect
SELECT FROM ORDER BY ASC, ASC;