SQL SELECT Flashcards
1
Q
What is SQL and how is it different from languages like JavaScript?
A
SQL is a back-end oriented language which is declaritive
2
Q
How do you retrieve specific columns from a database table?
A
select “whatever”
from”row”
3
Q
How do you filter rows based on some specific criteria?
A
where”whatever” = specific criteria
4
Q
What are the benefits of formatting your SQL?
A
More neat, readability
5
Q
What are four comparison operators that can be used in a where clause?
A
= , != , > , <
6
Q
How do you limit the number of rows returned in a result set?
A
limit = integer
at end of statement
7
Q
How do you retrieve all columns from a database table?
A
*
8
Q
How do you control the sort order of a result set?
A
Order by “whatever”
Descending