sql-select Flashcards
What is SQL and how is it different from languages like JavaScript?
primary way of interacting with relational databases that can retrieve, create and manipulate data- its different than JS bc it is declarative
How do you retrieve specific columns from a database table?
select “specific column”
from “table”
How do you filter rows based on some specific criteria?
where “attribute” = ‘something’
What are the benefits of formatting your SQL?
easier to read
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 *
from “blah”
How do you control the sort order of a result set?
default is ascending, can change to desc