book.sql
来自「《精通JSP编程 》源代码(赵强那本) 很有用的源代码」· SQL 代码 · 共 34 行
SQL
34 行
#创建数据库jnestore
create database jnestore;
use jnestore;
#创建存储用户信息的数据表account
create table account (
userid char (20) not null,
password char(20) not null,
email char(50),
realname char(50),
address varchar(255),
postalcode char(10),
phone char(20),
primary key (userid)
);
#创建存储图书信息的数据表book
create table book (
isbnid char(20) not null,
name char(50) not null,
author char (20) not null,
price char(10) not null,
primary key (isbnid)
);
#创建存储订单信息的数据表orderinfo
create table orderinfo (
isbnid char(20) not null,
userid char(20) not null,
primary key (isbnid,userid)
);
#向book表中加入初始数据
insert into book values ('7-115-11936-x','java advanced topics','zhaoqiang','46');
insert into book values('7-115-11937-x','j2ee programming:weblogic & jbuilder','zhaoqiang','48');
insert into book values('7-115-11938-x','weblogic bible ','BEA','85');
insert into book values('7-115-11939-x','Mastering EJB','Adams','45');
insert into book values('7-115-11940-x','Thinking in Java','SUN','35');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?