Re: Identity

From: Dan Guzman (guzmanda_at_nospam-online.sbcglobal.net)
Date: 11/03/04


Date: Wed, 3 Nov 2004 08:18:02 -0600

If you also want to remove data, you can use TRUNCATE table as long as the
table has no foreign key constraints.

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
"Sri" <Sri@discussions.microsoft.com> wrote in message 
news:41EFE7DF-6803-430E-BE72-CB673560D428@microsoft.com...
> How do you reset or reseed the IDENTITY column? 


Relevant Pages

  • Re: Truncate table being referenced by a foriegn key
    ... First you have to drop the foreign key constraints ... "Abhishek Srivastava" wrote in message ... > When I try to truncate the tables in my database I get error message> ... > Cannot truncate table 'bt_Bug' because it is being referenced by a> FOREIGN KEY constraint. ...
    (microsoft.public.sqlserver.programming)
  • Re: Truncate table being referenced by a foriegn key
    ... First you have to drop the foreign key constraints ... "Abhishek Srivastava" wrote in message ... > When I try to truncate the tables in my database I get error message> ... > Cannot truncate table 'bt_Bug' because it is being referenced by a> FOREIGN KEY constraint. ...
    (microsoft.public.sqlserver.programming)
  • Re: Constraints
    ... I dont have a query for this with me. ... Hari ... > Foreign Key constraints are there in my database... ... >> SQL Server MVP ...
    (microsoft.public.sqlserver.clients)
  • Re: Reseting Identity Seed
    ... Tibor Karaszi, SQL Server MVP ... > I want to reset the identity seed value for a table... ... it does not allow to truncate the table... ...
    (microsoft.public.sqlserver.server)
  • Re: Truncate table
    ... TRUNCATE is logged, but the only thing that is logged are the page ... > "Jacco Schalkwijk" ... >> You have to restore your last database backup. ... >> SQL Server MVP ...
    (microsoft.public.sqlserver.programming)