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

    Jun 21, 2016 · ALTER TABLE [dbo.table_name] ADD [Column_Name] BIT NOT NULL Default ( 0 ) Here is another way to add a column to an existing database table with a default value. A much more …

  2. 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?

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

    As an option you can initially create Null-able column, then update your table column with valid not null values and finally ALTER column to set NOT NULL constraint:

  4. 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...

  5. SQL Server add auto increment primary key to existing table

    As the title, I have an existing table which is already populated with 150000 records. I have added an Id column (which is currently null). I'm assuming I can run a query to fill this column with incremental …

  6. 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 need to …

  7. sql server - Add a column to a table, if it does not already exist ...

    Jan 15, 2012 · 314 You can use a similar construct by using the sys.columns table io sys.objects.

  8. SQL COMMANDS to add a new column - Stack Overflow

    Dec 13, 2023 · 1 I have customer table with column First_Name and Last_Name of Customer, I want to combine these two column with one Customername and add this Customer_Name column in the …

  9. Alter table add multiple columns ms sql - Stack Overflow

    Jul 8, 2016 · Possible duplicate of how to add multiple columns to sql table and add default constraint on one of them?

  10. t sql - How do you add a computed column to a Table? - Stack Overflow

    Jun 15, 2012 · How can I add a computed column to a table that already exists? S.O. has Computed Column Help - TSQL but no information about adding them.