mysql常见语法总结
show databases
;
select
database();
use test
;
drop database test
;
show tables
;
desc test
;
create table
test(
id int not
null primary key
,
name
varchar(100) not
null,
sex
varchar(40) not
null default '男'
);
drop table test
;
insert into
test (id
, name
) values (1, "百度");
insert into test
values (3, "谷歌", "www.google.com");
select
* from test
;
select id
from test where name
="百度";
update test
set name
="淘宝", url
="www.taobao.com" where id
=2;
create table newtest select
* from test
;
delete from test where id
=3;
delete from test
;
转载请注明原文地址: https://win8.8miu.com/read-7422.html