
sqlserver数据库
Leo.clion
1350公里,回家的路
展开
-
主键自增mysql
原创 2021-12-14 14:25:07 · 587 阅读 · 0 评论 -
sqlserver 配置管理器
原创 2021-11-09 15:23:29 · 464 阅读 · 0 评论 -
sql语句之坑 连接查询的两种方式:left join 和 另一个
--以下两条语句查询结果一样select * from t_gasbrand t1 left join t_userfiles t2 on t1.id = t2.f_gasbrand_id where t1.id = 17 --注意这里必须是where不能是and!!!where是取交集select * from t_gasbrand t1,t_userfiles t2 where t1.id = t2.f_gasbrand_id and t1.id = 17 --如果这样写就错误了s原创 2021-11-03 22:14:35 · 343 阅读 · 0 评论 -
sqlserver数据库备份
原创 2021-10-28 18:45:14 · 120 阅读 · 0 评论 -
分组前用where加条件,分组后用having加条件
--以下两条sql语句,查询结果一模一样,区别是,一个是分组前用where加限定条件,一个是分组后,使用having 加限定条件,查询结果都一样.select count(*) '停用总数' from v3.dbo.t_userinfo where f_user_state = '停用' group by f_user_state --group by 分组前,使用where加限定条件select count(*) '停用总数' from v3.dbo.t_userinfo group by f_u原创 2021-10-27 21:56:34 · 1135 阅读 · 0 评论