
DB
MySQL
polar-bear-lily
这个作者很懒,什么都没留下…
展开
-
数据库范式
原创 2020-12-10 21:31:19 · 83 阅读 · 0 评论 -
MySQL Error
Error Code : 1060 Duplicate column name 'xxx'有重复字段Error Code: 1248. Every derived table must have its own alias每个派生出来的表都必须有一个自己的别名select count(*) from (select * from list where name="xiao") as ...原创 2018-09-11 15:49:38 · 212 阅读 · 0 评论 -
MySQL备忘
查询的count()不计算重复条目SELECT count(distinct(t_feeling.id)) FROM t_feeling,t_friend where (feeling_user=t_friend.frnd_frnd or feeling_user=1) and t_friend.frnd_user=1查询结果不重复SELECT distinct *...原创 2018-09-12 20:20:49 · 130 阅读 · 0 评论 -
MyBatis往MySQL中插入一条记录后,需返回该条记录的自增主键值
MyBatis往MySQL中插入一条记录后,需返回该条记录的自增主键值<insert id="addBlog" parameterType="Blog" keyProperty="id" useGeneratedKeys="true"> INSERT INTO t_blog VALUES(null,#{title},#{summary},now(),0,0,#{conten...原创 2018-09-13 09:43:02 · 187 阅读 · 0 评论 -
sql根据查出值的不同输出html语句
select Concat('<a style=color:#4294E3; href=javascript:show(\'', id, '\') >', id, '<a >') id1from t_hy原创 2019-04-11 11:33:11 · 319 阅读 · 0 评论