-
Notifications
You must be signed in to change notification settings - Fork 0
/
Customer.sql
48 lines (47 loc) · 5.76 KB
/
Customer.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
create table CUSTOMER
(
Ssn CHAR(10) NOT NULL PRIMARY KEY,
Fname VARCHAR(15) NOT NULL ,
Minit CHAR,
Lname VARCHAR(15) NOT NULL,
DOB date,
Income decimal(12,2),
Policy_num int unique,
Phone int,
Agent_id char(10),
Purchase_date date,
Claim_num int
);
-- Convert data type of the Phone column
ALTER TABLE CUSTOMER MODIFY (Phone NUMBER(20));
INSERT INTO customer VALUES(1000000031, 'Shaine', 'F', 'Plastow', TO_DATE('1993-02-28', 'YYYY-MM-DD'), 156700, 11, 2191709420, 1000000011, TO_DATE('2018-08-17', 'YYYY-MM-DD'), 1);
INSERT INTO customer VALUES(1000000032, 'Phillida', 'Q', 'Farland', TO_DATE('1994-07-10', 'YYYY-MM-DD'), 119400, 5, 2286461611, 1000000018, TO_DATE('2019-01-19', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000033, 'Maximilian', 'H', 'Deniskevich', TO_DATE('1995-11-02', 'YYYY-MM-DD'), 148500, 6, 6786580941, 1000000014, TO_DATE('2018-11-01', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000034, 'Rosalinda', 'R', 'Bloore', TO_DATE('2001-12-01', 'YYYY-MM-DD'), 137100, 12, 1675878478, 1000000021, TO_DATE('1999-01-13', 'YYYY-MM-DD'), 2);
INSERT INTO customer VALUES(1000000035, 'Gloriana', 'R', 'Gebhardt', TO_DATE('1973-03-30', 'YYYY-MM-DD'), 139200, 14, 9555044231, 1000000020, TO_DATE('2018-10-03', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000036, 'Pierrette', 'P', 'Kilmary', TO_DATE('1980-07-05', 'YYYY-MM-DD'), 137700, 18, 7295006186, 1000000016, TO_DATE('2018-06-05', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000037, 'Melisande', 'U', 'Lyptratt', TO_DATE('1995-04-14', 'YYYY-MM-DD'), 157700, 13, 7124554531, 1000000011, TO_DATE('2018-10-09', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000038, 'Marty', 'C', 'Dalgliesh', TO_DATE('1973-03-22', 'YYYY-MM-DD'), 141100, 21, 8528177396, 1000000017, TO_DATE('2018-03-26', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000039, 'Karin', 'M', 'Rothermel', TO_DATE('1976-02-22', 'YYYY-MM-DD'), 93300, 15, 3589575033, 1000000029, TO_DATE('2018-08-09', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000040, 'Emmott', 'B', 'Dominicacci', TO_DATE('1977-08-12', 'YYYY-MM-DD'), 146500, 22, 4946543104, 1000000010, TO_DATE('2018-09-01', 'YYYY-MM-DD'), 3);
INSERT INTO customer VALUES(1000000041, 'Jarvis', 'Q', 'Muehler', TO_DATE('1974-09-20', 'YYYY-MM-DD'), 109200, 27, 2033931454, 1000000006, TO_DATE('2018-08-10', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000042, 'Pamela', 'V', 'Castellani', TO_DATE('1985-02-22', 'YYYY-MM-DD'), 140900, 10, 3894717434, 1000000009, TO_DATE('2018-08-22', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000043, 'Orson', 'I', 'Drewe', TO_DATE('1986-01-11', 'YYYY-MM-DD'), 86300, 23, 2096310563, 1000000019, TO_DATE('2018-08-18', 'YYYY-MM-DD'), 4);
INSERT INTO customer VALUES(1000000044, 'Marabel', 'A', 'MacRirie', TO_DATE('1988-07-05', 'YYYY-MM-DD'), 140000, 4, 6066758218, 1000000011, TO_DATE('2018-11-23', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000045, 'Bobine', 'H', 'Purver', TO_DATE('1989-11-25', 'YYYY-MM-DD'), 132100, 1, 8391673429, 1000000015, TO_DATE('2018-12-31', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000046, 'Edouard', 'Z', 'Thompson', TO_DATE('1986-11-22', 'YYYY-MM-DD'), 134100, 16, 1076465899, 1000000025, TO_DATE('2018-11-27', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000047, 'Feliza', 'A', 'Kaplan', TO_DATE('1986-12-21', 'YYYY-MM-DD'), 150400, 2, 7817716875, 1000000003, TO_DATE('2019-01-16', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000048, 'Regina', 'I', 'Alleyne', TO_DATE('1994-12-31', 'YYYY-MM-DD'), 115000, 3, 3162932738, 1000000003, TO_DATE('2018-08-31', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000049, 'Winslow', 'K', 'Argente', TO_DATE('1989-03-19', 'YYYY-MM-DD'), 158200, 8, 3278672633, 1000000014, TO_DATE('2018-06-29', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000050, 'Moises', 'Q', 'McGahern', TO_DATE('1998-03-27', 'YYYY-MM-DD'), 114600, 17, 9087668597, 1000000004, TO_DATE('2018-04-05', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000051, 'Leah', 'S', 'Laterza', TO_DATE('1998-08-22', 'YYYY-MM-DD'), 119600, 19, 8431272892, 1000000026, TO_DATE('2018-08-20', 'YYYY-MM-DD'), 2);
INSERT INTO customer VALUES(1000000052, 'Alanna', 'A', 'Slater', TO_DATE('1990-04-30', 'YYYY-MM-DD'), 112100, 20, 1575107631, 1000000029, TO_DATE('2018-10-16', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000053, 'Judah', 'X', 'Bruffell', TO_DATE('1996-05-24', 'YYYY-MM-DD'), 105900, 24, 1298822583, 1000000012, TO_DATE('2018-12-05', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000054, 'Rancell', 'H', 'Rabb', TO_DATE('1996-02-15', 'YYYY-MM-DD'), 159400, 25, 8398937234, 1000000021, TO_DATE('2018-12-20', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000055, 'Isac', 'S', 'Yacob', TO_DATE('1978-08-07', 'YYYY-MM-DD'), 118300, 7, 1095009928, 1000000019, TO_DATE('2018-03-22', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000056, 'Addi', 'Y', 'McInnerny', TO_DATE('1978-09-25', 'YYYY-MM-DD'), 156700, 26, 8664395157, 1000000002, TO_DATE('2018-10-21', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000057, 'Amil', 'V', 'Solly', TO_DATE('1996-01-15', 'YYYY-MM-DD'), 119900, 28, 9912292272, 1000000011, TO_DATE('2018-03-28', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000058, 'Orton', 'M', 'Dimitrov', TO_DATE('1992-12-15', 'YYYY-MM-DD'), 116700, 29, 6018245559, 1000000025, TO_DATE('2018-06-04', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000059, 'Ugo', 'Q', 'Toffanini', TO_DATE('2000-04-05', 'YYYY-MM-DD'), 104100, 30, 4197448545, 1000000009, TO_DATE('2019-01-19', 'YYYY-MM-DD'), null);
INSERT INTO customer VALUES(1000000060, 'Oswell', 'T', 'Sango', TO_DATE('1972-05-07', 'YYYY-MM-DD'), 82000, 31, 6162363629, 1000000023, TO_DATE('2018-11-23', 'YYYY-MM-DD'), null);
select * from customer;