About 878,000 results
Open links in new tab
  1. How to add a column with a default value to an existing table in …

    Jun 21, 2016 · Here is another way to add a column to an existing database table with a default value. A much more thorough SQL script to add a column with a default value is below …

  2. insert a NOT NULL column to an existing table - Stack Overflow

    Since SQL Server supports ADD CONSTRAINT, I'd recommend Pavel's approach of creating a nullable column, and then adding a NOT NULL constraint after you've filled it with non- NULL …

  3. Add column to SQL Server - Stack Overflow

    Dec 19, 2022 · I need to add a column to my SQL Server table. Is it possible to do so without losing the data, I already have?

  4. How to insert columns at a specific position in existing table?

    Jan 24, 2014 · Are you using MySQL or Postgres? Postgres can only put a new column at the end - which isn't a problem because the order of columns in a table is totally irrelevant. There is no …

  5. Add columns dynamically based on a condition in SQL

    Aug 4, 2015 · Consider a table A with columns A, B, C. I would like to dynamically add a new column, D to this table based on a condition in one of the existing columns. How can this be …

  6. Add new column with foreign key constraint in one command

    Jul 15, 2013 · I am trying to add a new column that will be a foreign key. I have been able to add the column and the foreign key constraint using two separate ALTER TABLE commands: …

  7. How to add a boolean datatype column to an existing table in sql?

    Oct 25, 2016 · In SQL SERVER it is BIT, though it allows NULL to be stored ALTER TABLE person add [AdminApproved] BIT default 'FALSE'; Also there are other mistakes in your query …

  8. sql - Add column in Oracle table - Stack Overflow

    Add column in Oracle table Asked 10 years, 10 months ago Modified 4 years, 8 months ago Viewed 155k times

  9. sql server - Altering SQL table to add column - Stack Overflow

    I currently have a table with four columns - i wanted to add a fifth column but having some trouble. I open the table in sql server studio management 2008 and i added the column info like so: C...

  10. sql server - Add a new table column to specific ordinal position ...

    Add the new column (s) to your table anyway you like, and then commit your changes to TFS. From there you can open the table's sql file in Visual Studio and manually move the order of …