SQL Flashcards
1
Q
Create database
A
CREATE DATABASE company;
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));
3
Q
insert
A
INSERT INTO employee (first,last,age,address,city,county) VALUES (‘Bob’, ‘dylan’ , ‘72, 79b causeway st’ , ‘portrush’, ‘antrim’);
4
Q
retrieve
A
SELECT first,last FROM employee WHERE city=’Belfast’;
5
Q
update
A
UPDATE employee SET county = ‘antrim’ WHERE city= ‘belfast’;
6
Q
delete
A
DELETE from employee WHERE city= ‘belfast’;