TABLE MANAGEMENT Flashcards
INSERT INTO
Key work to add data
INSERT INTO order(name, id, price)
VALUE(‘Teddy beer’, 6578, 13);
VALUES
It lets you add data to a newly created columns.
INSERT INTO order(name, id, price)
VALUE(‘Teddy beer’, 6578, 13)
DELETE FROM
It lets you remove specific data from a existing table based in the condition.
DELETE FROM order
WHERE price > 7
UPDATE
Renames or changes a data in a table.
UPDATE user
SET time = ‘19:00’
WHERE name = ‘smith’ ;
SET
Sets an instruction to update.
UPDATE user
SET time = ‘19:00’
WHERE name = ‘smith’ ;
CREATE TABLE
A keyword that lets you create a column.
CREATE TABLE name(floor INTEGER, company TEXT)
What are 3 common data types.
INTEGER, REAL and TEXT
ALTER TABLE
keyword to makes changes to an existing table.
ALTER TABLE data
ADD discount INT;
ADD
Adds a new column.
ALTER TABLE data
ADD discount INT;
DROP COLUMN
Removes a whole column.
DROP COLUMN column
RENAME
Renames the column name.
ALTER TABLE order
RENAME order TO bill;