[SQL ] Select已经Select好的值

楼主: testPtt (测试)   2016-03-15 08:46:09
我想
Select x
from a
where xxxxx
得到单一值 'xx'
之后想
Select o,'xx'as x
from b
where ooooo
我要怎么合并这2个查询?
作者: moyasi (Simple Life)   2016-03-15 10:29:00
讲真的 我根本看不懂你在说什么
作者: a926 (Aaron)   2016-03-15 11:11:00
SELECT 已经SELECT好的值 不就是子查询吗 XDDDDD
作者: retsamsu   2016-03-15 15:14:00
Select o, (Select x from a where xxxxx) as x from bwhere ooooo
楼主: testPtt (测试)   2016-03-15 18:33:00
喔 以解 写在from里当做一个表格
作者: anchime (Anchi)   2016-03-18 08:40:00
sub query
作者: jonce007 (汪汪)   2016-04-15 14:31:00
谢谢retsamsu大,我有类似问题,看到你的回答,解决了^^

Links booklink

Contact Us: admin [ a t ] ucptt.com