→ streetbad: SELECT 'A' as t_name,id,category FROM A WHERE index 05/16 15:14
→ streetbad: = @str UNION SELECT 'B' as t_name,id,category FROM 05/16 15:14
→ streetbad: B WHERE index = @str UNION ..... 05/16 15:14
→ streetbad: 可以同時撈出表名做成列表 如果要排序最後+order就好 05/16 15:15
推 jackiechin: select t1.* from 11/16 19:06
→ jackiechin: (select 'a' as tb ,id, category, index from a 11/16 19:06
→ jackiechin: union 11/16 19:06
→ jackiechin: select 'b' as tb ,id, category, index from b 11/16 19:06
→ jackiechin: union 11/16 19:06
→ jackiechin: select 'c' as tb,id, category, index from c) t1 w 11/16 19:06
→ jackiechin: here t1.index = 'xxxxxx' 11/16 19:06