sql-select Flashcards
What is SQL and how is it different from languages like JavaScript?
powerful way to retrieve, create, and manipulate data in a relational databases.
(structured query language)
SQL is a declarative programming language. meaning the programmers describe the results they want and the programming environment comes up with its plans to get that result. (example: CSS and HTML) –> example: you put the property and value to make the font bigger.
relational databases interpret SQL and comes up with the most efficient plan to get the results from the programmers command lines.
How do you retrieve specific columns from a database table?
using the keyword “select” and “from”.
How do you filter rows based on some specific criteria?
WHERE CLAUSE
What are the benefits of formatting your SQL?
readability
What are four comparison operators that can be used in a where clause?
=, < , > and !=
How do you limit the number of rows returned in a result set?
limit Clause
How do you retrieve all columns from a database table?
select * (astrix)
How do you control the sort order of a result set?
order by (option descending)