-
Notifications
You must be signed in to change notification settings - Fork 2
/
db.sql
59 lines (49 loc) · 1015 Bytes
/
db.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
52
53
54
55
56
57
58
59
DROP DATABASE IF EXISTS account_book;
CREATE DATABASE account_book;
USE account_book;
CREATE TABLE books (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
date DATETIME NOT NULL,
amount INT NOT NULL,
subject VARCHAR(255),
PRIMARY KEY(id)
);
INSERT INTO
books (name, date, amount, subject)
values
('Johnny', '2018-7-04', 12000, 'lunch');
INSERT INTO
books (name, date, amount, subject)
values
(
'Peter',
'2018-04-04',
23000,
'dinner'
);
INSERT INTO
books (name, date, amount, subject)
values
('Charles', '2012-12-04', 12000, 'aws');
INSERT INTO
books (name, date, amount, subject)
values
('Paul', '2014-07-04', 1000, 'subway');
INSERT INTO
books (name, date, amount, subject)
values
('Janny', '2008-7-04', 22000, 'brunch');
INSERT INTO
books (name, date, amount, subject)
values
(
'Mike',
'2019-7-04',
12000,
'notebook'
);
INSERT INTO
books (name, date, amount, subject)
values
('Sam', '2019-01-04', 299000, 'salary');