SQL Flashcards
1
Q
How do you create a new table?
A
CREATE TABLE table_name (
column datatype,
column datatype
)
2
Q
How do you insert a new record into an table?
A
INSERT INTO users (email, username, pwd) VALUES (‘test@gmail.com’, ‘test123’, ‘rightright’);
3
Q
How can you select a specific record?
A
SELECT * from users WHERE id = 1
4
Q
How can you update a specific record?
A
UPDATE table_name SET email = ‘new@gmail.com’ WHERE id = 1
5
Q
How can you delete a specific record?
A
DELETE from table_name WHERE id = 1
6
Q
How can you receive all records from a table?
A
SELECT * from table_name