Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Delete an Existing Column in a Table
How To Delete an Existing Column in a Table? - MySQL FAQs - Understanding SQL CREATE, ALTER and DROP Statements
✍: FYIcenter.com
If you have an existing column in a table and you do not need that column any more, you can delete it with "ALTER TABLE ... DROP COLUMN" statement. Here is a tutorial script to delete an existing column:
mysql> ALTER TABLE tip DROP COLUMN create_date; Query OK, 1 row affected (0.48 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> SELECT * FROM tip; +----+-------------+-------------------------+--------+ | id | subject | description | author | +----+-------------+-------------------------+--------+ | 1 | Learn MySQL | Visit dev.fyicenter.com | NULL | +----+-------------+-------------------------+--------+ 1 row in set (0.00 sec)
As you can see the column "create_date" is gone.
2007-05-11, 4692👍, 0💬
Popular Posts:
How do I install JUnit? First I will download the lastest version of JUnit. Then I will extract all ...
How To Assign Query Results to Variables? - Oracle DBA FAQ - Working with Database Objects in PL/SQL...
Can Java object be locked down for exclusive use by a given thread? Yes. You can lock an object by p...
What will be printed as the result of the operation below: main() { int a=0; if (a==0) printf("Cisco...
How To Avoid the Undefined Index Error? - PHP Script Tips - Processing Web Forms If you don't want y...