About 197,000 results
Open links in new tab
  1. sql server - Truncate with where clause - Database Administrators Stack ...

    Apr 12, 2017 · Can I use truncate command with a where clause? I need to remove specific rows from several tables. How can I delete specific data from the entire database? SELECT …

  2. sql server - DELETE vs TRUNCATE - Database Administrators Stack …

    Dec 13, 2012 · Truncate requires "alter table" permission (in the sense that truncate is plug in replacement for delete).

  3. sql server - Reset IDENTITY value - Database Administrators Stack …

    I have a table with an IDENTITY column. While developing I delete the rows from time to time and add them again. But the IDENTITY values always kept increasing and didn't start from 1 when I added ...

  4. Truncating a table with a foreign key constraint - SQL Server

    Sep 29, 2018 · Doesn’t matter if the table is empty. You need to either drop and re-create the foreign key constraint or just perform a delete instead of a truncate. How often are you really just emptying …

  5. sql server - Truncate tables with dependent foreign key constraints ...

    8 You cannot truncate a table that has foreign key constraints. I would script your truncate statement to drop the constraints, then truncate the table, and then re-create the constraints. Because …

  6. sql server - How safe is to use BACKUP LOG WITH TRUNCATE_ONLY ...

    Jan 24, 2019 · As per the title, how much is it safe to use BACKUP LOG db_name WITH TRUNCATE_ONLY in last STEP of any SQL-job execution? Randomly found on google that this …

  7. sql server - SQL Permission to Truncate Table - Database …

    Feb 28, 2018 · How Do I give permission for user to Truncate all tables in database? The minimum permission required is 'ALTER on table_name' per articles below. With this, how do I give permission …

  8. How do I truncate the transaction log in a SQL Server 2008 database?

    9 How do I truncate the transaction log in a SQL Server 2008 database? What are possible best ways? I tried this from a blog as follows: 1) From the setting database to simple recovery, shrinking the file …

  9. sql server - How long will a truncate table take on 252M Rows (170GB ...

    As a TRUNCATE is a DDL (Data Definition Language) operation and not a DML (Data Manipulation Language) operation and only the system tables are part of the transaction, I'm presuming that it …

  10. Reuse of space after TRUNCATE TABLE by other tables

    Sep 19, 2023 · If I do truncate my table, will the growth of other tables re-use that space freed up, and hence save disk space in the long term? Yup, which is one reason why SHRINK ing is silly - it's just …