![]() The last_name field will be created as a varchar(40) NOT NULL column and will appear after the contact_id column in the table. ![]() ![]() ![]() This ALTER TABLE example will add two columns to the contacts table - last_name and first_name. Let's look at an example that shows how to add multiple columns in a MySQL table using the ALTER TABLE statement. If this parameter is not specified, the new column will be added to the end of the table. It tells MySQL where in the table to create the column. column_definition The datatype and definition of the column (NULL or NOT NULL, etc). new_column_name The name of the new column to add to the table. table_name The name of the table to modify. The syntax to add multiple columns in a table in MySQL (using the ALTER TABLE statement) is: ALTER TABLE table_name
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |