Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in SQL by (6.1k points)
I need to change the data type of multiple columns from float to int.

How can I do it?

Also, there is no data to be worried about, yet.

1 Answer

0 votes
by (12.7k points)
ALTER TABLE tablename MODIFY columnname INTEGER;

This will be changing the datatype of a given column

Based on how many columns you need to change, it might be the best to generate a script or use any sort of the MySQL client GUI 

Are you Interested to Learn SQL? Choose this SQL Certification course for learning more about SQL.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...