一、安装
二、连接
1. 主机ip地址:服务器地址
2. 用户名:用户注册名字
3. 密码:用户登录密码
4.端口:应用程序入口
5.数据库实例名:数据实例名字
三、运算符
1.等于: =
2.小于: <
3.大于: >
4.不等于:<>
5.模糊查找:like
四、SQL语句
-
select:语句后面跟展示字段, 例:select * xxx 或 select xxx from
-
from: 语句后面跟表名, 例:from xxx
-
where:条件语句, 例:where xxx
注:
-
like查找用 ' '把内容包括起来:
-
where xxx='xxx '
-
order by:语句后面跟字段名(排序用)
-
asc: 升序: 例:order by xx asc
-
desc:倒序: 例 order by xx desc
例:select * from xxx where like'%xxx'/='xxx' order by xxx ace/desc
五、通配符
-
*:只跟在select 后面
-
_:一个字符
-
%:查找多个字符
六、语法
-
统计
-
计数:select count(*) from 表名
-
求和:select sum(*) from 表名
-
最小值:select min(*) from 表名
-
最大值:select max(*) from 表名
-
平均值:select avg(*) from 表名
-
分组
-
group by : group by xxx(字段名)