我们常常会使用delete table1 where id=1或者delete from table1 where id=1来删除数据,不论"id"是int型还是varchar型.但当"id"是varchar型,且不能转换为int型时,使用delete from table1 where id=1_11就会报错,我们得为"id"的值添加引号才能得到想要的结果.即
错:delete from table1 where id=1_11
错:delete table1 where id=1_11
对:delete from table1 where id='1_11'
对:delete table1 where id='1_11'