第一题
mysql> create table employees (id int, name varchar(50) not null, age int, gender varchar(10) not null default 'unknown', salary float);
mysql> desc employees;
第二题
mysql> create table orders (id int,name varchar(100) not null,price float,quantity int,category varchar(50),primary key(id));
mysql> desc orders;
第三题
mysql> create table invoices (number int auto_increment,order_id int, foreign key (order_id) references orders(id),in_date date,total_amount float check (total_amount>0),primary key(number));
mysql> desc invoices;