-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecords.sql
32 lines (25 loc) · 961 Bytes
/
records.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--SAMPLE TABLE FOR THE records
CREATE TABLE records(
id numeric(10) NOT NULL,
fname varchar(15) NOT NULL,
lname varchar(15) NOT NULL,
phone numeric(10) NULL,
address VARCHAR2(20),
city char(10),
gender numeric(3)
);
INSERT INTO records VALUES(1,"kom","kilbread",2357495987,"143-persian","col","M");
INSERT INTO records VALUES(2,"chun","smithkill","karnan-5/3","ny","M");
INSERT INTO records VALUES(3,"goda","elizabeth",3456789241,"2-3-10-quill","cal","F");
INSERT INTO records VALUES(4,"grul","blackpearl",74892547209,"6-256-arch","nj","F");
INSERT INTO records VALUES(5,"melk","thunder",6478902678,"va","F");
INSERT INTO records VALUES(6,"ducy","coulson","98-dawnjo","co","M");
SELECT *
FROM records
WHERE phone IS NULL --searches for cords having null phone number
SELECT *
FROM records
WHERE phone IS NOT NULL --searches for records having no null values in phone number
SELECT *
FROM records
WHERE address IS NULL