-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsfbank.sql
45 lines (32 loc) · 1.25 KB
/
tsfbank.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
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
SET PASSWORD FOR root@localhost = PASSWORD('your_root_password');
CREATE TABLE `customers` (
`id` int(4) NOT NULL,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`balance` int(11) NOT NULL DEFAULT 50000
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `customers` (`id`, `name`, `email`, `balance`) VALUES
(1, 'Prodeep Kumar', '[email protected]', 50000),
(2, 'Pallab Kumar', '[email protected]', 50000),
(3, 'Karim Ali', '[email protected]', 50000),
(4, 'George David', '[email protected]', 50000),
(5, 'Thalapati Biswakarma', '[email protected]', 50000),
(6, 'Harry Watson', '[email protected]', 50000),
(7, 'Chanchal Chowdhury', '[email protected]', 50000),
(8, 'Riya Khatun', '[email protected]', 50000),
(9, 'Moumita Sarkar', '[email protected]', 50000),
(10, 'Dinesh Kumar', '[email protected]', 50000);
CREATE TABLE `transaction` (
`sender` text NOT NULL,
`receiver` text NOT NULL,
`balance` int(10) NOT NULL,
`datetime` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `customers`
ADD PRIMARY KEY (`id`);
ALTER TABLE `customers`
MODIFY `id` int(4) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
COMMIT;