-
Notifications
You must be signed in to change notification settings - Fork 0
/
database.sql
51 lines (33 loc) · 1.08 KB
/
database.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
49
50
51
CREATE TABLE login_signup(
first_name varchar,
last_name varchar,
j_num varchar,
email varchar,
password varchar
);
CREATE TABLE login_signup_tutor(
first_name varchar,
last_name varchar,
j_num varchar,
secretCode varchar,
email varchar,
password varchar
);
CREATE TABLE student_code(
first_name varchar,
last_name varchar,
j_num varchar,
uniqueCode varchar
);
CREATE TABLE admin(
first_name varchar,
j_num varchar,
password varchar
);
INSERT INTO student_code VALUES ('Ujjwal', 'Baskota', 'J00787739', 'A334411');
INSERT INTO admin VALUES ('Ujjwal', 'J00787739', '12345');
INSERT INTO admin VALUES ('John', 'J00787738', '12345');
INSERT INTO admin VALUES ('Jack', 'J00787740', '12345');
INSERT INTO login_signup_tutor VALUES ('Ujjwal', 'Baskota', 'J00787739', 'A334411', 'ujjwal.baskota@gmail.com', '123456')
INSERT INTO login_signup_tutor VALUES ('Ujj', 'Baskota', 'J00787738', 'A334411', 'ujjwal.baskota@gmail.com', '123456')
SELECT secretcode, uniquecode FROM student_code JOIN login_signup_tutor ON student_code.uniquecode = login_signup_tutor.secretcode;