Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将这两个表连接到一个表中。年和月,在下拉列表中。是不是像
year-month 0-1 1-2 1-3
是否可以在 mysql 查询中执行此操作。
SELECT CONCAT( a.year, '-', b.month ) AS year_month FROM year_table a, month_table b;
你的意思是这样吗?
select concat(a.yearNo,'-',b.monthNo) as yearMonth from table1 a, table2 b where a.someID=b.someID