Section 1

Preview this deck

Alias

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 14, 2020

Cards (13)

Section 1

(13 cards)

Alias

Front

SELECT column_name AS 'whatever you want' FROM table_name;

Back

Select unique values

Front

SELECT DISTINCT column_name FROM table_name;

Back

Insert new row

Front

INSERT INTO table_name (parameter_1, parameter_2, parameter_ 3) VALUES (value_1, value_2, value_3);

Back

Create Table

Front

CREATE TABLE table_name ( column_1 data_type, column_2 data_type, column_3 data_type );

Back

Return range of values

Front

SELECT * FROM table_name WHERE column_name = value1 BETWEEN value_1 AND value_2; A couple of things to note -For letters, 2nd value is not inclusive -For numbers, 2nd value is inclusive

Back

Alter table

Front

ALTER TABLE table_name ADD COLUMN column_name data_type;

Back

Returning values that are null

Front

SELECT * FROM table_name WHERE column_name IS NULL;

Back

Delete from table

Front

DELETE FROM table_name WHERE column_name;

Back

LIKE value

Front

SELECT * FROM table_name WHERE column_name1 = value_1 LIKE 'pattern';

Back

List data in a particular order

Front

SELECT * FROM table_name WHERE column_name = value1 ORDER BY column_name; ORDER BY always goes after WHERE clause if present

Back

Update

Front

UPDATE table_name SET column_2 = value_2; WHERE column_1 = value_1;

Back

Wild Card _

Front

Substitute any character within that pattern SELECT column_name FROM table_name WHERE column_name1 LIKE 'Se_en'; Both 'Seven' and 'Se7en' match

Back

Wild Card %

Front

Matches 0 or more missing letters in a pattern SELECT * FROM table_name WHERE column_name LIKE 'a%' Returns anything that begins with a.

Back