How can we change the name and data type of a column of a
table?

Answer Posted / yogesh verma

Hi This is yOgEsH....!!
By this query we can change the data type of particular column :

ALTER TABLE products ALTER COLUMN price TYPE numeric(10,2);

Is This Answer Correct ?    7 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is timestamp in mysql?

545


Can mysql handle big data?

507


How to include numeric values in sql statements?

490


How to get data from mysql in php?

421


What is mysql used for?

508






What is the difference between char and varchar?

534


How to enter microseconds in sql statements?

511


Which is better mysql or mssql?

468


What is meant by mysqli?

483


What command is used to delete the data from the table without deleting the table structure?

445


What is the password of mysql?

464


Why should I learn mysql?

476


How to create a trigger in mysql?

483


How do I start mysql in linux?

465


How to use 'mysql' to run sql statements?

515