DDL Flashcards
1
Q
ALTER Syntax to Add Column
A
ALTER TABLE table_1
ADD COLUMN column_1 INT
2
Q
ALTER Syntax to Drop column
A
ALTER TABLE table_1
DROP COLUMN column_1
3
Q
SAFE UPDATES
A
SET SQL_SAFE_UPDATES = 0;
4
Q
Steps to Alter
A
- Alter table
2. Update table
5
Q
ALTER command
A
Add and Remove table Columns
6
Q
CHANGE command
A
Modify table columns
7
Q
CHANGE Syntax
A
ALTER TABLE table_1
CHANGE COLUMN old_column_name New_column_name INT;
8
Q
CHANGE syntax structure
A
- Old Column name
- New Column name
- New Data Type
9
Q
ALTER and Change
A
- Alter table
2. Change column
10
Q
FLOAT vs INT
A
Float includes decimals. Useful for Cost/Price.
11
Q
CREATE Command
A
Generate New tables
12
Q
DROP command
A
removes table from a database
13
Q
CREATE TABLE syntax
A
CREATE TABLE table_name_( column_1 data_type, column_2 data_type, column_3 data_type );
14
Q
CHAR vs VARCHAR
A
- Char=fixed length string(can contain letters, numbers, and special characters)
- VARCHAR=variable length string (can contain letters, numbers, and special characters)
15
Q
CREATE DATABASE Syntax
A
CREATE DATABASE database_name;