About 13,500 results
Open links in new tab
  1. sql server - Why does simple ALTER TABLE command take so long on …

    In SQL Server 2012+, the operation is much faster, see Online non-NULL with values column add in SQL Server 11 as it only updates the metadata of the table and does not actually update any rows. …

  2. sql server - Permission to grant SELECT, UPDATE, DELETE, ALTER on all ...

    Sep 12, 2022 · In SQL Server 2019, I have created a user defined database role MyDbRole. Now I want to grant following permissions to MyDbRole for all tables in the database. CREATE, SELECT, …

  3. sql server - The ALTER TABLE statement conflicted with the FOREIGN …

    Jul 12, 2019 · SQL Server will create the foreign key without verifying the existing data in the table. When you update/insert data in the child table, those records will still be checked. Consequently, …

  4. sql server - Add autoincrement to existing PK - Database …

    Apr 23, 2017 · ALTER TABLE dbo.ident_test DROP COLUMN id_temp; And finally, reseed the IDENTITY column, so the next record's id will resume after the highest existing number in the id …

  5. sql server - Unable to alter CDC tables - Database Administrators Stack ...

    Nov 18, 2024 · I have an issue with being unable to alter a CDC table that previously caused us no issue. We run alter statements on our cdc tables to add a column to the tables that we now are …

  6. sql server - Can I change table structure in a transaction and then ...

    Can I change table structure in a transaction and then roll it back if there is an error? Ask Question Asked 13 years, 2 months ago Modified 5 years, 4 months ago

  7. sql server - ALTER TABLE ALTER COLUMN <name> failed because one …

    May 27, 2024 · SQL Server 2022 has a new option when creating statistics that can automate this as per the (emphasis mine): AUTO_DROP = { ON | OFF } Applies to: SQL Server 2022 (16.x) and later …

  8. sql server - Invalid Column Name Error after ALTER and UPDATE ...

    Dec 14, 2017 · I am trying to UPDATE a specific column within a table, but I get an error due to the fact that when SQL compiles, the column name IssueTimeUTC does not actually ...

  9. Altering nullability of column in SQL Server

    In practice it seems that SQL Server does allow some additional cases beyond that mentioned in the documentation however. As you show in your question ALTER TABLE test ALTER COLUMN field1 …

  10. sql server - What is a WITH CHECK CHECK CONSTRAINT? - Database ...

    4 | 41 4 | 42 ALTER TABLE b WITH CHECK CHECK CONSTRAINT [My_FORIEGN_KEY]; -- check existing data and enable constraint GO Msg 547 Level 16 State 0 Line 1 The ALTER TABLE …