SQL-Insert Flashcards
How do you add a row to a SQL table?
By using the INSERT INTO statement followed by the table name in double quotes. After that a list of comma separated column names within parentheses. On the next line use the VALUES statement followed by a list of comma separated column values within parentheses
What is a tuple?
a list of values is referred to as a tuple.
How do you add multiple rows to a SQL table at once?
to add multiple values, you would use the VALUES statement followed by multiple list of values each inside their own set of parentheses
How do you get back the row being inserted into a table without a separate select statement?
use the RETURNING statement with an * to return all created rows