- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
mysql语句[优质文档]
# 启动和停用数据库net start mysqlnet stop mysql # 登陆和退出mysql -hlocalhost -uroot -p123;quit; # 注释#/* */ 脚本中可以使用 -- # 查看版本select version(); # 查看日期select current_date(); # 查看当前时间select now(); # 查看用户select user(); # 取消未完成的输入\c #显示有哪些数据库show databases; #显示当前数据库select database(); #创建数据库。如:创建menageriecreate database menagerie; #切换到menagerieuse menagerie; #通过登陆直接进入menagerie数据库mysql -hlocalhost -uroot -p menagerie*** #删除数据库drop database menagerie #显示当前数据库中的tableshow tables; #新建一个tablecreate table pet(name varchar(20),owner varchar(20),species varchar(20),sex char(1),birth date, death date); #describe显示table的结构describe pet; #显示表是如何创建的show create table pet; #删除tabledrop table pet; #insert 插入记录insert into pet values(Puffball,Diane,hamster,f,1999-03-30,NULL); #select 语句select * from pet; #delete 删除记录delete from pet where name=’Puffball’; #update 将Bowse的birth 改成1989-08-31update pet set birth=1989-08-31 where name=Bowser; #清空tabledelet from pet; #3.5批处理mysql -hlocalhost -uroot -p123d:/site/s.txt #或mysql -hlocalhost -uroot -p d:/site/s.txtEnter password: *** #或\. d:/site/s.txt\. d:\\site\\s.txt #where 语句select * from pet where name=Bowser; #找出1998年1月1日以后出生的PETselect * from pet where birth 1998-1-1; #找出母狗select * from pet where species = dog and sex=f; #找出蛇以及鸟select * from pet where species = bird or species=snake; #找出公猫以及母狗select * from pet where (species=cat and sex=m) or (species=dog and sex=f); #显示pet的Name 和 birthselect name, birth from pet; # UNIONselect * from pet where binary pet.name regexp ^bunionselect * from pet where binary pet.name regexp py$; #找出宠物主人select owner from pet; #DISTINCT 只出现一次select distinct owner from pet; #选出猫狗的name,species,birthselect name, species, birth from pet wherespecies=dog or species =cat; #选出name,birth 按 birth 排序select name, birth from pet order by birth; #选出name,birth 按 birth 倒序排序select name, birth from petorder by birth desc; #强制区分大小写功能select name, birth from petorder by binary name desc; #多项
您可能关注的文档
最近下载
- 中外教育案例分享.pptx
- 《北京图书馆藏中国历代石刻拓本汇编》全100册下载.docx VIP
- 初中七年级(人教版)语文(上下册)课本全部(45篇)诗词文言文集合.doc VIP
- 2025年贵州省防雷检测技术专业技术人员执业能力评估考试复习题库(附答案).docx
- DB42T 1544-2020公路工程试验检测设备期间核查规范.docx
- 学前教育社会学.pptx
- 中考作文备考:2021年广东省语文中考作文 导写(附:审题指导及范文点评).docx
- GB T 28896-2023 金属材料 焊接接头准静态断裂韧度测定的试验方法(OCR).pdf VIP
- 波谱分析习题集参考答案1002(参考).doc VIP
- 调车工作—排风与拉风(铁路行车组织).pptx
文档评论(0)