1. 安装
create user, grant, phpmyadmin
revoke
update, mysqladmin
\s或者status
创建表user的语句:show create table user
show grants;
password()函数
show databases;
use 数据库名;
desc user;
describle 表名;或desc 表名;
'#', '--'均可用于注释
create database school;
drop database school;
drop database if exists school;
create table student #建立学生表
(
id int(5) auto_increment not null primary key,
name char(10) not null,
address varchar(50) default '清华大学'
year date
);
select left(address,10) from student; 只看address的前10个字符
select count(*) from student;统计记录数
select (100+98+99)/3;当计算器来用
select """hello";结果为"hello, 将2个双引号当做1个双引号
或select "\"hello";结果为"hello
select '''hello';结果为'hello
select '\'hello';结果为'hello
select 0xa+0; 结果为10
select 0x5061756c; 结果为Paul
select x'4d7953514c';结果为MySQL
select hex('cat');结果为636174
select TRUE,true, FALSE,false;结果为1,1,0,0
select * from 'select' where 'select'.id>100;
create table orders('my orders' varchar(100));
删除表:drop table student;