About 499,000 results
Open links in new tab
  1. SQL to add column and comment in table in single command

    Jul 3, 2012 · I want to add a column and a comment to an existing table. I can do that easily with the below commands ALTER TABLE product ADD product_description VARCHAR2(20)

  2. Alter MySQL table to add comments on columns - Stack Overflow

    Apr 1, 2019 · Comments can be added without causing table reconstruction. You can use MODIFY COLUMN to do this. Just do... substituting: your_previous_column_definition with the column's column_definition, which I recommend getting via a SHOW CREATE TABLE YourTable command and copying verbatim to avoid any traps.*

  3. How to add a comment to an existing table column in SQL Server?

    Jan 26, 2012 · If you want to add descriptive text to a column, you can set the Column Description using SQL Server Management Studio: To set the description programmatically, you can use the sp_addextendedproperty, sp_updateextendedproperty and sp_dropextendedproperty stored procedures. Example:

  4. SQL ALTER TABLE Statement - W3Schools

    The ALTER TABLE statement is used to add, delete, or modify columns in an existing table. The ALTER TABLE statement is also used to add and drop various constraints on an existing table. ALTER TABLE - ADD Column

  5. Adding a Comment to a Column When Creating a Table in SQL

    Nov 29, 2024 · In MySQL, we use the COMMENT keyword within the CREATE TABLE statement to add a description to each column. To start, let’s view the general syntax: column_name column_type COMMENT 'Comment Here' . Above, we specify the <table_name>, column_name, column_type, and Comment Here.

  6. MySQL :: MySQL 9.3 Reference Manual :: 15.1.10 ALTER TABLE

    To add (or change) a table comment: ALTER TABLE t1 COMMENT = 'New table comment'; Use ALTER TABLE with the TABLESPACE option to move InnoDB tables between existing general tablespaces, file-per-table tablespaces, and the system tablespace.

  7. MySQL ALTER TABLE Command for Adding Comments on Columns

    Learn how to use the MySQL ALTER TABLE command to add comments on columns effectively in your database.

  8. How to add columns and comments to a table in Oracle?

    The general syntax for adding a table column is as follows: ALTER TABLE table_name ADD column_name data_type; table_name corresponds to the name of the table where the field needs to be added, column_name is the name of the field …

  9. SQL Server ALTER TABLE ADD Column - SQL Server Tutorial

    Summary: in this tutorial, you will learn how to use SQL Server ALTER TABLE ADD statement to add one or more columns to a table. The following ALTER TABLE ADD statement appends a new column to a table: ADD column_name data_type column_constraint; Code language: SQL (Structured Query Language) (sql) In this statement:

  10. Adding a comment in alter command in oracle - Stack Overflow

    Jul 25, 2013 · I am adding a column in oracle and I also want to add comments to describe the column. Here's my syntax: ALTER TABLE TableName ADD (ColumnName VARCHAR(10) null COMMENT ON tableName.columnName IS 'some comments');

Refresh