I’ve created a table like this :
create table tbl(
address varchar(5000));
If i want to insert data in to the field address, if the length of data inserted exceeds the length of the field address. Then first truncate the the data and insert it in to address.
please give me the correct query for the above problem….
I’ve tested on my mysql (5.5.8), create table as follows:
then insert
then select
gives me
1234567890I think mysql will automatically truncate anything bigger you pass in to the field, so you don’t need to worry, unless you need to log it in your application level everytime that happens