Reputation: 1
How to join two table table with different data types? in the first table status field type is enum and in second table it is int, how i can join these tables
Upvotes: 0
Views: 1480
Reputation: 3924
Enum type is stored by MySQL as an int, so you can do the join as usual. But in case both fields were different you should cast one of them to make their types match if possible (usually with cast functions http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html)
Upvotes: 1