我的表-1有20列,而表-2有15列。這裏我想通過用戶ID加入兩個表格。 我用這個波紋管查詢只在mysql中選擇特定的列
SELECT * FROM table_checkout_bidpack as t1 inner JOIN table_user_information
as t2 ON t1.user_id=t2.user_id
此查詢選擇35列,但我需要在第二個表
我知道這項工作列(USER_NAME)選擇
select t1.col1,t1.col2,t1.col3,t1.col4,.....,t2.user_name
FROM table_checkout_bidpack as t1 inner JOIN table_user_information
as t2 ON t1.user_id=t2.user_id
這看起來很大任何其他方式做到這一點
所以你想從t1的所有列,但只有t2從user_name? – 2011-02-25 04:56:30