`sage` datetime DEFAULT NULL,
`Ssex` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#
# Data for table "student"
#
INSERT INTO `student` VALUES ('01','趙磊','1990-01-01 00:00:00','男');
DROP TABLE IF EXISTS `emp_pay_trmp`;
CREATE TABLE `emp_pay_trmp` (
`city` char(20) CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci NOT NULL DEFAULT '',
`last_name` char(23) CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci NOT NULL DEFAULT '',
`first_na` varchar(255) DEFAULT NULL,
`pay_rate` double(2,0) DEFAULT NULL,
`salary` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#
# Data for table "emp_pay_trmp"
#
INSERT INTO `emp_pay_trmp` VALUES ('greenwood','stephens','tina',NULL,NULL),('indianapolis','plew','linda',NULL,NULL),('whiteland','glass',NULL,NULL,NULL),('indianapolis','plew','linda',NULL,NULL),('indianapolis','plew','linda',NULL,NULL),('indianapolis','plew','linda',NULL,NULL);
#
# Structure for table "employe1"
#
DROP TABLE IF EXISTS `employe1`;
CREATE TABLE `employe1` (
`emp_id` char(9) NOT NULL,
`position` varchar(15) NOT NULL,
`emp_name` varchar(20) NOT NULL,
`emp_page` int(10) DEFAULT NULL,
`emp_phone` int(13) DEFAULT NULL,
`pay_rate` double(4,2) NOT NULL,
UNIQUE KEY `emp_phone` (`emp_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#
# Data for table "employe1"
#
INSERT INTO `employe1` VALUES ('112','mysql> select ','曉麗',21112,212,99.99),('113','2255','戰臺',456,NULL,0.00),('114','1213','董靜',45,NULL,59.00),('118','1200','華斯',8966,1546,66.00);
#
# Structure for table "employe2"
#
DROP TABLE IF EXISTS `employe2`;
CREATE TABLE `employe2` (
`emp_id` char(9) NOT NULL,
`position` varchar(15) NOT NULL,
`emp_name` varchar(20) NOT NULL,
`emp_page` int(10) DEFAULT NULL,
`emp_phone` char(12) DEFAULT NULL,
`pay_rate` double(4,2) NOT NULL,
UNIQUE KEY `emp_phone` (`emp_phone`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#
# Data for table "employe2"
#
INSERT INTO `employe2` VALUES ('','','',NULL,NULL,22.00),('','','',NULL,NULL,11.00),('101','','',NULL,NULL,0.00),('101','','',NULL,NULL,0.00);
#
# Structure for table "employee_tb2"
#
DROP TABLE IF EXISTS `employee_tb2`;
CREATE TABLE `employee_tb2` (
`emp_id` char(9) NOT NULL,
`emp_name` varchar(20) NOT NULL,
`emp_page` int(10) DEFAULT NULL,
`emp_phone` int(13) DEFAULT NULL,
PRIMARY KEY (`emp_id`),
UNIQUE KEY `emp_phone` (`emp_phone`)
uj5u.com熱心網友回復:
) ENGINE=InnoDB DEFAULT CHARSET=utf8;#
# Data for table "employee_tb2"
#
INSERT INTO `employee_tb2` VALUES ('1001','123',NULL,1000),('1002','123',NULL,1001);
#
# Structure for table "employee_tbl"
#
DROP TABLE IF EXISTS `employee_tbl`;
CREATE TABLE `employee_tbl` (
`emp_id` char(9) NOT NULL,
`emp_name` varchar(20) NOT NULL,
`emp_page` int(10) DEFAULT NULL,
PRIMARY KEY (`emp_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#
# Data for table "employee_tbl"
#
INSERT INTO `employee_tbl` VALUES ('101','dongjinghanng',NULL);
#
# Structure for table "employee1"
#
DROP TABLE IF EXISTS `employee1`;
CREATE TABLE `employee1` (
`emp_id` char(9) NOT NULL,
`position` varchar(15) NOT NULL,
`emp_name` varchar(20) NOT NULL,
`emp_page` int(10) DEFAULT NULL,
`emp_phone` int(13) DEFAULT NULL,
UNIQUE KEY `emp_phone` (`emp_phone`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#
# Data for table "employee1"
#
INSERT INTO `employee1` VALUES ('112','','張好',NULL,123456);
#
# Structure for tab
uj5u.com熱心網友回復:
注意:建表資料后期因為講解習題插入的數值改動較大,數值只供參考alter table student add Snam varchar(10) null;
alter table student drop Snam ;
create database Test1;//創建資料庫
use test1;//使用資料庫
create table Student(//創建表
Student_id char(9) not null,
Student_sname varchar(10) not null,
Student_city varchar(10) not null,
Student_phone integer(10) null);
alter table student add Student_st varchar(10) null;
alter table student add Student_age datetime null;
insert into student values('100','趙雷','1997-01-09','北京','1234','m');
insert into student values('101','王楠','1997-01-09','北京','','');
insert into student(Student_sname) values('gdsa'),('s'),('sdh');
select *from student;
create table employee_tbl(
emp_id char(9) not null primary key,
emp_name varchar(20) not null,
emp_page integer(10) null);
create table employee_tbl(
emp_id char(9) not null ,
emp_name varchar(20) not null,
emp_page integer(10) null,
primary key(emp_id));
alter table student add constraint student_st primary key (student_id);
create table employee_tb
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/49921.html
標籤:MySQL
上一篇:vfp9報表問題(問題解決)
