sql
小皮de梦想
这个作者很懒,什么都没留下…
展开
-
Mysql根据字段a的不同值,更新字段b为不同值
使用case when:UPDATE cp_system_param SET `value`=CASE WHEN cp_system_param.`code`='system_name' THEN 'aa' WHEN cp_system_param.`code`='system_title' THEN 'bb' WHEN cp_system_param.`code`='web_flg' T...原创 2018-07-04 16:03:00 · 5310 阅读 · 0 评论 -
ORACLE系列异常总结ORA
本文对常见的Oracle使用中的异常解决方案进行总结1.ORACLE异常--ORA系列:ORA-00904 标识符无效 invalid identifier2.ORACLE异常--ORA-00918 未明确定义列 column ambiguously defined3.ORA-00942 表或视图不存在 table or view does not exist4.ORA-00984...转载 2018-09-20 09:47:50 · 144 阅读 · 0 评论 -
报错:java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
不要怀疑,就是配置文件有问题。检查app.properties,app-dev.properties,app-pro.properties,以及db.properties.总有一个有问题。原创 2019-04-01 17:14:41 · 305 阅读 · 0 评论 -
SQL Count(*)函数,GROUP_By,Having的联合使用
SELECT v.*,count(*) from video vLEFT JOIN tags t on t.video_id =v.idwhere t.tag in(1,2,3) GROUP BY v.id HAVING(COUNT(*)>=3)常用于多对一(一对多)查询我想查 tag=1,tag=2,tag=3得数据,如果不加HAVING(COUNT(*)>=3),则ta...原创 2019-04-09 15:11:25 · 397 阅读 · 0 评论 -
mybatis:Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the man
报错信息如下:java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' ' at line 7] with root ...原创 2019-04-17 17:08:47 · 22231 阅读 · 0 评论 -
MYBATIS MYSQL 获取当前时间戳
如图。附上参考链接:https://www.cnblogs.com/ggjucheng/p/3352280.html原创 2019-04-18 17:25:41 · 8956 阅读 · 0 评论 -
mybatis报错:java.lang.NumberFormatException: For input string
由改为或者:<if test="index == 'A'">改为<if test='index == "A"'>原创 2019-04-23 15:46:22 · 793 阅读 · 0 评论