[MySQL] 如何參照欄位的值查詢 table?
例如我有四張表
tableindex 和 tablex, table1, tablemark 等
在 tableindex 中有三個欄位
欄位 rowindex rowdata usetable
值 1 rowtest x
2 rowtiger 1
3 rowlion mark
4 rowtest x
usetable 代表要使用的表
而 tablex, table1, tablemark 都有 rowindex 這個欄位,所存的值和 tableindex.rowindex
一致
那要如何取出在各個表中所儲存的資料排序?
以上面的例子 就是要取出 tablex.rowtest(當 rowindex=1 | 4),
table1.rowtiger(當 rowindex=2), tablemark.rowlion(當 rowindex=3)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.158.15