How to use SQL commands to modify a non-null (notnull) field in a data table _ PHP Tutorial

Source: Internet
Author: User
Use SQL commands to modify a non-null (notnull) statement in a data table. ALTERTABLEtable1ALTERCOLUMN [name] varchar (60) NULL; why [] is added to the name field of Table 1, because name is an SQL keyword conflict and an error occurs, just in case. If

Alter table table1 alter column [name] varchar (60) NULL;

Table 1 table name
Why [] is added to the name field name, because name is an SQL keyword conflict and an error occurs, just in case.

If the name field has already created an index, if you need to modify it, you must first delete the index before it can be correctly performed.

Http://www.bkjia.com/PHPjc/322002.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/322002.htmlTechArticleALTER TABLE table1 alter column [name] varchar (60) NULL; why [] is added to the table1 TABLE name field name, because name is an SQL keyword that will conflict with the error, so that it is in case. If...

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.