怎么对下句查出来的USER_TYPE 都置为1?
select a.user_type from secu_user a ,secu_department b where a.parent_id=b.dept_id and b.dept_layer in (1,2,3,4) and a.user_login is not null 用UPDATE怎么实现?
select a.user_type from secu_user a ,secu_department b where a.parent_id=b.dept_id and b.dept_layer in (1,2,3,4) and a.user_login is not null 用UPDATE怎么实现?
解决方案 »
- SQL查询速度慢,请大家帮忙分析!
- 请教高手!mysql数据库转移到oracle数据库,通过odbc,但是查询处的汉字都是乱麻!
- 一个oracle问题
- TOAD FOR ORACLE 安装后的配置!
- 关于插入日期的问题?
- 请问怎么用SQL起一个事务(transaction)以及提交(commit)和回滚(rolback)?
- 新手问题~~~前辈可以帮看看么???
- oracle 9i连接问题(在win2000server)
- 要写总结:oracle与ms sql主要有什么不同之处?
- 求5千万数据从sql server导入us7ascii编码oracle数据方案
- 关于直接安装和使用DBCA创建数据库时,快速恢复有何区别?
- 请问个级联删除的问题
SET a.user_type = 1
WHERE EXISTS (SELECT 1
FROM secu_department b
WHERE a.parent_id = b.dept_id AND b.dept_layer IN
(1, 2, 3, 4))
AND a.user_login IS NOT NULL
向hebo学习
(select 1 from secu_user a ,secu_department b where a.parent_id=b.dept_id and b.dept_layer in (1,2,3,4) and a.user_login is not null );
(select 1 from secu_department b where a.parent_id=b.dept_id and b.dept_layer in (1,2,3,4) and a.user_login is not null );