随笔分类 - MySQL
摘要:转载 http://blog.csdn.net/qq_27093465/article/details/52817938
阅读全文
摘要:count(*)表示计算总行数 select count(*) from students; max(列)表示求此列的最大值 select max(id) from students where gender=0; min(列)表示求此列的最大值 select min(id) from studen
阅读全文
摘要:select * from 表名; 在 select 后面列前使用distinct 可以消除重复的行 select distinct gender from students; 一、条件 使用where子句对表中的数据筛选,结果为true的行会出现在结果集中 语法如下 select * from 表
阅读全文
摘要:mysql -hip地址 -uroot -p 登录 exit = Ctrl + d 退出 select version(); 查看当前版本 select now(); 显示当前时间 create database 数据库名字 charset = utf8; 创建数据库 drop database 数
阅读全文
摘要:1 brew install mysql ( 安装 ) 2 bash mysql.server start (启动) 3 mysql -uroot (登陆) mysql> show databases; 4 退出MySQL命令:exit + (回车) ************************
阅读全文

浙公网安备 33010602011771号