使用具有定义值的Phpmyadmin中的命令将新列添加到表结构[关闭]

Basically I need to add a new column to a table. I need to call that column category and in that column of Category I want the default value to be the name of that new category column I will add.

How can I do this inside of phpmyadmin by command?

I have about 100 tables and each table has 100+ items, which is why I need to do it with a command rather than manually adding the column and the name.

Thanks

Add new column in a exsisting table with default value:-

ALTER TABLE table_name
ADD new_col_name VARCHAR(50) DEFAULT 'new value' NOT NULL;

Try this:

alter table test.Name add NewCol varchar(10) NOT NULL DEFAULT 'new val'

It should helps.