Αποτελέσματα Αναζήτησης
DROP COLUMN. The DROP COLUMN command is used to delete a column in an existing table. The following SQL deletes the "ContactName" column from the "Customers" table:
DROP COLUMN column_name; Code language: SQL (Structured Query Language) (sql) In this syntax: First, specify the name of the table that contains the column which you want to drop after the ALTER TABLE keywords. Second, specify the name of the column that you want to drop in the DROP COLUMN clause.
MySQL DROP COLUMN statement allows us to drop one or more columns from the MySQL table. Dropping a column deletes the data which belongs to that column.
13 Μαρ 2024 · To delete a column, use ALTER TABLE and DROP COLUMN as demonstrated below: ALTER TABLE table_name DROP COLUMN column_name; Here, table_name is the name of the table from which you want to remove a column, and column_name is the name of the column you wish to delete.
DROP COLUMN statement: ALTER TABLE table_name DROP [COLUMN] column_name [, DROP [COLUMN] column_name]; Here: The table_name is the name of the table from which the column was dropped after the ALTER TABLE keyword . The column_name is the name of the column to drop after the DROP COLUMN keyword.
10 Δεκ 2020 · In SQL, if you want to remove a column from a table, you need to use the ALTER TABLE statement with the DROP COLUMN clause. That removes the column and all its data. Syntax. The syntax goes like this: ALTER TABLE table_name . DROP COLUMN column_name;
Discover how to remove a column in MySQL using the ALTER TABLE command. Learn the typical syntax to drop a column efficiently in your MySQL database.