create table info (
id int auto_increment,
title varchar(50),
content text,
shijian timestamp,
primary key(id)
)
charset=utf8
engine=innodb
insert into info values(null,"标题","内容",now())
...
单表
新建表
CREATE TABLE IF NOT EXISTS article(
id INT(10) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
author_id INT(10) UNSIGNED NOT NULL,
category_id INT(10) UNSIGNED NOT NULL,
views INT(10) ...
1,按名字查找
select * from vfast where name=" ";
2,按薪水查找,薪水大于5000
select name from vfast where salary>=5000;
3,每个部门有多少人
select count(*) from vfast group b...