About 50 results
Open links in new tab
  1. 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...

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

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

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

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

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

  7. sql - How to easily add columns to a temp table? - Stack Overflow

    Mar 21, 2016 · alter #temp add column int; insert into #table (column) select column from table; This is a bit cumbersome if I want to add multiple columns. Is there a way to add column to a temp table …

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

    This answer is a small addition to the highest voted answer and works for SQL Server. The question requested an auto increment primary key, the current answer does add the primary key, but it is not …

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

    Add column in Oracle table Ask Question Asked 11 years, 3 months ago Modified 5 years, 1 month ago

  10. Add a column to existing table and uniquely number them on MS SQL ...

    Sep 20, 2008 · 135 I want to add a column to an existing legacy database and write a procedure by which I can assign each record a different value. Something like adding a column and autogenerate …