The sql statement to modify the table name is the "ALTER TABLE" statement. The basic syntax is: "ALTER TABLE
[modify options]"; the "ALTER TABLE" statement is used to modify the design of an existing table; columns can be added, modified, or deleted in an existing table.
The sql statement to modify the table name is the "ALTER TABLE" statement.
The ALTER TABLE statement is used to add, modify, or delete columns in an existing table. Alter statement When modifying the Sql Server table structure, the Alter statement is commonly used. Some commonly used alter statements are listed below
ALTER TABLE statement is used to modify the design of an existing table.
Basic syntax: ALTER TABLE
[Modify options]
ALTER TABLE table ADD COLUMN field type[(size)] [NOT NULL] [constraint index]Copy after loginALTER TABLE table ADD CONSTRAINT multifieldindexCopy after loginALTER TABLE table DROP COLUMN fieldCopy after loginALTER TABLE table DROP CONSTRAINT indexnameCopy after loginDescription:
## The #table parameter is used to specify the name of the table to be modified. ADD COLUMN is a reserved word of SQL. Use it to add fields to the table. ADD CONSTRAINT is a reserved word of SQL. Use it to add an index to the table. DROP COLUMN is a reserved word of SQL. Use it to delete fields from the table. DROP CONSTRAINT is a reserved word of SQL. Use it to delete the index from the table. field specifies the name of the field to be added or deleted. The type parameter specifies the data type of the new field. The size parameter is used to specify the length of the text or binary field. The indexname parameter specifies the name of the multi-field index to be deleted. Recommended tutorial: "sql video tutorial"
The above is the detailed content of What is the sql statement to modify the table name?. For more information, please follow other related articles on the PHP Chinese website!
Related labels:source:php.cnPrevious article:What are the SQL date format conversion functions? Next article:What are the SQL statements to delete fields in a table?Statement of this WebsiteThe 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.cnLatest Articles by Author
2020-07-18 17:02:12 2020-07-18 16:49:11 2020-07-18 16:41:53 2020-07-18 16:34:27 2020-07-18 16:07:55 2020-07-18 15:17:34 2020-07-18 15:11:18 2020-07-18 15:01:19 2020-07-18 14:49:54 2020-07-18 14:34:23Latest IssuesSQL Count() also requires 0 I have only one table and I want to count each entry of a tag that starts with 0. Now I tr...From 2024-04-06 19:48:5301449Related TopicsMore>Popular RecommendationsPopular TutorialsMore>
SQL Reference Manual3542 SQL Fun Class58451Latest DownloadsMore>