首页 > 数据库技术 > 详细

mysql select 语句用法

时间:2016-01-16 19:38:34      阅读:182      评论:0      收藏:0      [点我收藏+]
  1. 选择在tea表中选择teaage等于19岁,叫汪雪的

    select*from tea where teaage=‘19‘&&stuname=‘张雪‘

  2. 在stu找出大于20岁的女同学的姓名、学号

    select stuname,stuid from stu where teaage=‘19‘&&stusex=‘女‘;

  3. 选择tea表中teaname有姓李

    select*from tea where teaname like ‘李%‘;

  4. 在tea表中teaage按降序方法来排序

    select*from tea order byteaage desc;

  5. 在tea中给teaidA0006的teasex改为女

    update tea set teasex=where teaid =‘A0006‘;

  6. 删除一行id=1

    delete from 表明 where id=1;

  7. 给root授权

    grant all privileges on *.*(备注指所有库,具体可以是mysql)to ‘root‘ @ %(所有ip具体192.168.1.117) identified by ‘123456‘(密码)。

  8. rpm -q查询rpm 包是否安装


本文出自 “11106201” 博客,转载请与作者联系!

mysql select 语句用法

原文:http://11116201.blog.51cto.com/11106201/1735553

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!