SQL select Flashcards
What is SQL and how is it different from languages like JavaScript?
A declarative language, you tell it what you want now how to do it
How do you retrieve specific columns from a database table?
select “column name”
How do you filter rows based on some specific criteria?
where “column” (comparison operator) ‘filter’
What are the benefits of formatting your SQL?
readability
What are four comparison operators that can be used in a where clause?
!, > , < , =
How do you limit the number of rows returned in a result set?
Limit (#)
How do you retrieve all columns from a database table?
Select *
How do you control the sort order of a result set?
Order by (criteria)
How do you skip a certain amount of entries before sending it back
Offset