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

Answer Posted / aftab alam

to add new columns in databases


alter table <table name> add column <column name> datatype;

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is mysql a relational database?

610


What is ddl, dml, and dcl?

745


How do you select a table?

684


How to Recover a MySQL root password. Stop the MySQL server process. Start again with no grant tables. Login to MySQL as root. Set new password. Exit MySQL and restart MySQL server.

733


Is mysql deprecated?

664


How can you retrieve a portion of any column value by using a select query?

676


What is a simple query?

647


What is a storage engine? What are the differences between innodb and myisam engines?

749


Where is mysql used?

761


What is tee command in mysql?

690


What is limit in mysql?

650


Suppose you have to collect the first name, middle name and the last name of students from the below table. But, you observe that there few missing values either in the first name, middle name and the last name columns. How will you return the first non-null values?

720


Is mysql a nosql database?

725


What are the advantages and disadvantages of using mysql?

711


What are slow queries?

659