Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[疑问] 请教一条sql语句

[复制链接]
cy1982 发表于 2009-10-20 20:50:05 | 显示全部楼层 |阅读模式
select * from supe_spacenews where itemid in
(SELECT relativeitemids FROM supe_spacenews WHERE itemid=4691)
这是我的sql语句,后面SELECT relativeitemids FROM supe_spacenews WHERE itemid=4691这句,查询出的结果是
4700,4681,4668,4651,4648           这样的结果。可是
select * from supe_spacenews where itemid in
(SELECT relativeitemids FROM supe_spacenews WHERE itemid=4691)这条sql语句取出的,只有4700这个id的信息,应该有5条才对啊。
回复

使用道具 举报

guokun 发表于 2009-10-20 20:55:48 | 显示全部楼层
看不懂 帮顶下
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-14 21:07 , Processed in 0.117778 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表