mysql语法

show databases

show tables

select * from test1.user                 #查询test1库里user表中所有内容

select host,user,password from test1.user limit 3        #只显示前3列

select host,user,password from test1.user where user ="root" and host ="localhost"    #加上条件

insert into test1.user(num) value(1)            #向user表中的num属性插入一个value为1的值

creat table test1.user(num int,primary key(num))        #在test1库中建立user表

alter table test1.user add name char(20) after num        #在test1库中的user表中建立name表,并且在num后

update test1.user set name='bob'            #设置name属性值为bob

update test1.user set tel=123456789            #设置tel属性值为123456789

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值