If one column is of type int and say has a value 10. The other column is of type varchar and has a value of '10'. Is it safe to join on these values (mySql), and would I get the same result as if both were of type int and value 10?
I need to have them of different types because in one table the column is an autoincrementing key (so it must be int). The other column (in a different table) may occasionally contain values with letters so I must make it varchar. Can you forsee any huge problems with this or maybe I should rethink my schema?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…