-
Notifications
You must be signed in to change notification settings - Fork 1
/
Samaja Sathkara SQL codes.txt
67 lines (59 loc) · 1.58 KB
/
Samaja Sathkara SQL codes.txt
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
USE SamajaSathkara;
SELECT * FROM ContactForm;
SELECT * FROM ContactForm Where firstname='thisal';
CREATE DATABASE SamajaSathkara;
SHOW DATABASES; view all databases currently created
DROP DATABASE SamajaSathkara; delete created database
DROP TABLE User;
CREATE TABLE ContactForm (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
readed BOOLEAN,
submitdate DATE,
submittime TIME,
firstname VARCHAR(30) NOT NULL,
lastname VARCHAR(30) NOT NULL,
email VARCHAR(50),
pnumber VARCHAR(15),
messages VARCHAR(50000));
CREATE TABLE proposedprojects(
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
readed BOOLEAN,
submitdate DATE,
submittime TIME,
proposername VARCHAR(30) NOT NULL,
pnumber VARCHAR(15),
email VARCHAR(50),
description VARCHAR(50000));
CREATE TABLE User (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
userid VARCHAR(30) NOT NULL,
createdate DATE,
cratetime TIME,
firstname VARCHAR(30) NOT NULL,
lastname VARCHAR(30) NOT NULL,
email VARCHAR(50),
pnumber VARCHAR(15),
userpassword VARCHAR(15));
CREATE TABLE Projects (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
projectid VARCHAR(30) NOT NULL,
completed BOOLEAN,
createdate DATE,
cratetime TIME,
projectname VARCHAR(30) NOT NULL,
estimatedprojectcost VARCHAR(30) NOT NULL,
raised VARCHAR(30) NOT NULL);
CREATE TABLE Donation(
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
ProjectID VARCHAR(30) NOT NULL,
amount INT(6),
submitdate DATE,
submittime TIME,
BankSlip VARCHAR(30) NOT NULL,
isMember BOOLEAN,
UserID VARCHAR(30) NOT NULL,
fullname VARCHAR(30) NOT NULL,
NIC VARCHAR(30) NOT NULL,
email VARCHAR(50),
pnumber VARCHAR(15),
approved BOOLEAN);