Reputation: 1
I want to concatenate this two table to one tabel. year and month, in dropdown. Is it like
year-month
0-1
1-2
1-3
Is it possible to do it in mysql query.
Upvotes: 0
Views: 151
Reputation: 33502
You mean like this?
select concat(a.yearNo,'-',b.monthNo) as yearMonth from table1 a, table2 b where a.someID=b.someID
Upvotes: 0
Reputation: 8020
SELECT
CONCAT( a.year, '-', b.month ) AS year_month
FROM
year_table a,
month_table b;
Upvotes: 2