SQL Note----Manipulating columns in a relational table

Source: Internet
Author: User

You can add a new column to a table by using the ALTER keyword.

Like what:

Add a column to the table for persons with the name birthday, and the type is date.

ALTER TABLE Persons ADD Birthday Date

The format for using ALTER is:

ALTER TABLE table_name ADD column_name datatype

The action to delete a column in a table is:

ALTER TABLE  DROPCOLUMN column_name

To change the properties of a column:

ALTER TABLE table_name ALTER COLUMN column_name datatype

Reference: http://www.w3school.com.cn/sql/sql_alter.asp

18:10:51

SQL Note----Manipulating columns in a relational table

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.