-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSQL
18 lines (11 loc) · 847 Bytes
/
SQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
SQL
CREATE DATABASE testWeb;
CREATE TABLE Login (id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,username VARCHAR(30) NOT NULL,password VARCHAR(30) NOT NULL,userType VARCHAR(50));
CREATE TABLE CourseTable (id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,CourseName VARCHAR(30) NOT NULL,CourseCode VARCHAR(30) NOT NULL);
CREATE TABLE CourseRegisterTable (id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,CourseCode VARCHAR(30) NOT NULL,Name VARCHAR(30) NOT NULL,userType VARCHAR(50));
INSERT INTO Login (username, password, usertype) VALUES ('Rowan', '12345', 'S');
INSERT INTO Login (username, password, usertype) VALUES ('Rizu', '12345', 'T');
INSERT INTO Login (username, password, usertype) VALUES ('Mishal', '12345', 'T');
SELECT * from Login;
SELECT * from CourseRegisterTable;
mysqldump -u rowan testWeb > /home/rowan/Documents/testWeb.sql