Section 1

Preview this deck

Aliases

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (24)

Section 1

(24 cards)

Aliases

Front

SELECT field1 AS 'alias'

Back

Distinct

Front

SELECT DISTINCT field1 FROM table1

Back

max()

Front

SELECT MAX("column_name") FROM "table_name"

Back

Insert column

Front

ALTER TABLE table_name ADD COLUMN field_name TEXT;

Back

sum()

Front

SELECT SUM(foo) FROM BAR

Back

Data types

Front

Integer, text, date, real, null

Back

Primary key

Front

a field that uniquely identifies a record in a table

Back

Insert row

Front

INSERT INTO table (field1, field2...) VALUES (val1, val2, val3)

Back

min()

Front

SELECT MIN("column_name") FROM "table_name_

Back

count()

Front

SELECT COUNT("column_name") FROM "table_name"

Back

View table

Front

SELECT * FROM table; SELECT name FROM celebs;

Back

DEFAULT

Front

Sets default value for column

Back

NOT NULL

Front

The clause in a CREATE TABLE command used to indicate which columns cannot contain null values

Back

group by

Front

A SQL clause used to create frequency distributions when combined with any of the aggregate functions in a SELECT statement.

Back

Limit

Front

SELECT * FROM table1 LIMIT n;

Back

Delete row

Front

DELETE FROM table_1 WHERE field1 IS condition;

Back

Cases

Front

CASE WHEN THEN ELSE END

Back

round()

Front

SELECT round(column, places)

Back

Unique column

Front

Requires a different value for every row

Back

having

Front

A clause applied to the output of a GROUP BY operation to restrict selected rows.

Back

avg()

Front

SELECT AVG(column_name) FROM table_name

Back

Edit table

Front

UPDATE table SET field1=value WHERE id=1;

Back

Create table

Front

CREATE TABLE table_name ( column_name1 data_type, column_name2 data_type, column_name3 data_type, ... )

Back

Sorting

Front

ORDER BY field

Back