![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql
梦星剑魂
这个作者很懒,什么都没留下…
展开
-
mysql的update复杂语句
UPDATE t_s_user a ,(SELECT ur.id,bu.username,bu.realname,ur.roleids, (SELECT r.rolename FROM t_s_role r WHERE r.id IN(IFNULL(ur.roleids,''))) rolenames from t_s_base_user bu LEFT JOIN ( SELECT u.id,ru.roleids FROM t_s_user u LEFT j...原创 2021-05-27 10:05:10 · 1357 阅读 · 0 评论 -
mysql为表添加新列(亲测有效,满意点赞)
添加列:ALTER TABLE tablename ADD column datatype [primary key/default/not null/…] COMMENT ‘注释’ AFTER ‘columnX’ //在colunmX列后增加字段其中 [] 里面的内容没有顺序例:ALTER TABLE test ADD phone int not null DEFAULT 1 COM...原创 2019-11-05 10:16:06 · 553 阅读 · 0 评论