[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