SQL Flashcards

1
Q

Create database

A

CREATE DATABASE company;

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

create tables

A
CREATE TABLE employee
(first varchar(15),
last varchar(20),
age number(3),
address varchar(30),
city varchar(20),
county varchar(20));
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

insert

A

INSERT INTO employee (first,last,age,address,city,county) VALUES (‘Bob’, ‘dylan’ , ‘72, 79b causeway st’ , ‘portrush’, ‘antrim’);

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

retrieve

A

SELECT first,last FROM employee WHERE city=’Belfast’;

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

update

A

UPDATE employee SET county = ‘antrim’ WHERE city= ‘belfast’;

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

delete

A

DELETE from employee WHERE city= ‘belfast’;

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