Home  >  Article  >  Database  >  What is the sql delete column statement of mysql

What is the sql delete column statement of mysql

coldplay.xixi
coldplay.xixiOriginal
2020-10-26 15:44:5712215browse

Mysql’s sql delete column statement is: 1. Add calumn, the code is [alter table actor drop column last_name]; 2. Without adding calumn, the code is [alter table actor drop last_n].

What is the sql delete column statement of mysql

Mysql's sql delete column statement is:

There is already a table actor and contains the column last_name

-- To delete a column, the following two methods can be used

alter table actor drop  column last_name;
alter table actor drop last_name;

-- To add a column, the type of column must be specified

alter table actor add last_name varchar(10);

More related free learning recommendations :mysql tutorial(Video)

The above is the detailed content of What is the sql delete column statement of mysql. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn