admin 管理员组

文章数量: 1086019


2024年4月24日发(作者:阿司匹林肠溶片吃几粒)

create database 数据库名;

create table 表名(字段名 字段类型,……,unsigned或zerofill);

drop table 表名;//删除此表

desc 表名;

show tables;

select * from 表名;

insert into 表名(字段名) values(……);

整形:tinyint(1字节)(-128~127)

smallint(2字节)、mediumint(3字节)

int (4) bigint(8)

浮点:float(M,D) varchar(23) text

时间日期:日期data 时间time 日期时间datatime年份类型 year

zerofill

unsigned/zerofill/default

primary key/not null

updata 表名 set

列1=新值1,

列2 = 新值2,

where 姓名=李四

order by 排序select * from demol order by score asc;

select name,id from demol order by score asc;

asc升序;desc降序;

delete from 表名 where age>25;

auto_increment 对id自增长一次;


本文标签: 时间 表名 字段名 类型 肠溶片