SQL Flashcards

1
Q

How do you create a new table?

A

CREATE TABLE table_name (
column datatype,
column datatype
)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How can you select a specific record?

A

SELECT * from users WHERE id = 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you update a specific record?

A

UPDATE table_name SET email = ‘new@gmail.com’ WHERE id = 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can you delete a specific record?

A

DELETE from table_name WHERE id = 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How can you receive all records from a table?

A

SELECT * from table_name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly