Answers for "add column with value from another column sql"

SQL
2

sql add column after another

ALTER TABLE myTable ADD myNewColumn VARCHAR(255) AFTER myOtherColumn
Posted by: Guest on February-01-2021
0

sql alter table add column if exists

IF NOT EXISTS (
  SELECT
    *
  FROM
    INFORMATION_SCHEMA.COLUMNS
  WHERE
    TABLE_NAME = 'table_name' AND COLUMN_NAME = 'col_name')
BEGIN
  ALTER TABLE table_name
    ADD col_name data_type NULL
END;
Posted by: Guest on May-07-2021

Code answers related to "add column with value from another column sql"

Code answers related to "SQL"

Browse Popular Code Answers by Language