forked from leekoko/Java-Web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sql
More file actions
41 lines (37 loc) · 812 Bytes
/
Copy pathinit.sql
File metadata and controls
41 lines (37 loc) · 812 Bytes
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
/**
* 1.创建数据库
*/
drop database if exists Visitor;
create database Visitor;
/**
* 2.创建表
*/
use Visitor;
create table users
(
ID int(4) not null primary key auto_increment,
UserName varchar(100),
Pwd varchar(50)
);
create table visitors
(
ID int(4) not null primary key auto_increment,
UserID int(4),
VisitTime datetime,
LeftTime datetime,
ip varchar(50),
comefrom varchar(100)
);
create table history
(
ID int(4) not null primary key auto_increment,
VisitID int(4),
VisitTime datetime,
Url varchar(200)
);
/**
* 为users表添加3个初始用户
*/
insert into users (username,pwd) values ("小A","123456");
insert into users (username,pwd) values ("小B","abcdef");
insert into users (username,pwd) values ("小C","123abc");