SQL Basics + Manipulation Flashcards
define table
collection of data organized into rows and columns.
relation
another word for a table: collection of data organized into rows and columns.
define column
a set of data values of a particular type
define row
A row is a single record in a table.
“*” character
Wildcard character. It allows you to select every column in a table without having to name each one individually.
most common data types (4)
INTEGER, a positive or negative whole number
TEXT, a text string
DATE, the date formatted as YYYY-MM-DD
REAL, a decimal value
define statement
text that the database recognizes as a valid command.
what do statements end with?
SEMICOLON ;
What does the SELECT statement return?
a new table called the result set.
3 components of a statement
1) Clause/Command: performs a specific task
2) Table Name
3) Parameter: list of columns, data types, or values passed to a clause as an argument
CREATE statements
allow us to create a new table in the database
SELECT statements
fetch data from a database
INSERT statement
inserts a new row into a table.
ALTER TABLE statement
add, delete, or modify columns in an existing table.
also used to add and drop various constraints on an existing table.
ADD COLUMN statement
lets you add a column to the table