mysql 将select查询的值赋给update set语句中
来源:互联网 发布:课程表安排软件 编辑:程序博客网 时间:2024/06/05 03:58
表tenant_oper结构:
create table `tenant_oper` ( `id` int(11) not null auto_increment, `oper_name` varchar(255) not null, `oper_code` varchar(255) not null, `remark` varchar(512) default "", `menu_id` int default 0, primary key (`id`)) engine=InnoDB default charset=utf8;
表tenant_menu结构:
create table `tenant_menu` ( `id` int(11) not null auto_increment, `menu_code` varchar(255) not null, `menu_name` varchar(255) not null, `menu_position` smallint not null, `menu_url` varchar(255) default "", `parent_id` int default 0, primary key (`id`)) engine=InnoDB default charset=utf8;
update tenant_oper set oper_code = '5_4_1_1', menu_id = (select id from tenant_menu where menu_code = '5_4_1') where oper_code = '5_4_1';
0 0
- mysql 将select查询的值赋给update set语句中
- mysql 中将select查询的值赋给insert语句
- 将Select的值直接赋给Input
- 将Select的值赋给两个Input
- 将Select的值用逗号分割赋给Input
- 怎么把 sql语句查询的值赋给变量
- 通过反射将一个对象的值赋给另一个对象中对应的属性 不需要用set、get
- mysql中update select的值
- mysql update select 语句
- select查询出来的某个值,怎么赋给一个变量呢?
- MySQL的Update语句Set顺序问题
- mysql的查询select 语句
- MYSQL的UPDATE语句中使用子查询
- MySQL 中 delete ,update语句的子查询限制
- [MSSQL]将查询结果赋值给变量时使用set与select的区别
- 将查询结果赋值给变量时使用set与select的区别
- Mysql查询语句使用select.. for update导致的数据库死锁分析
- mysql下更新查询出的数据的语句upda set select
- multimap
- 全局变量、局部变量、静态全局变量、静态局部变量的区别
- 单选按钮事件
- JVM内存的设置
- 延年益寿的十个习惯之我见
- mysql 将select查询的值赋给update set语句中
- Java SE 多线程下载网络上的文件代码+注释
- android NFC学习笔记(二)
- 哈希表
- 国内HTML5前端开发框架
- 为Fedora21 aarch64制作RPM包(tengine)
- Cocos2dx技术(三)——cocos2dx基本概念(四)动作
- 【BZOJ3932】【CQOI2015】任务查询系统 可持久化线段树
- BNU 背包密码(编码与解密)