Re: Delete table data



It might be best to script out all the objects, drop the db and recreate it
again. Just make sure to have a backup and make sure you script out all the
objects including indexes, triggers etc.

--
Andrew J. Kelly SQL MVP


"Ryan Langton" <langton@xxxxxxxxxxxxxxxxxx> wrote in message
news:uJiCyzgYFHA.3280@xxxxxxxxxxxxxxxxxxxxxxx
> Is there any easy way to clear all table data for a SQL server database?
> I have a SQL server for which I've been using old data to test. Now that
> it is going out into production next week I need to clear all table data
> so that I can import their current data without violating any primary
> keys.
>
> Thanks,
> Ryan
>


.



Relevant Pages

  • Re: Upsizing from Access doubles varchar columns
    ... 32 Ridley Road ... > in development and happy to drop and recreate everything then the ... > Tasks> Generate Script in Enterprise Manager), ... > design in Access will also be appropriate for SQL Server. ...
    (microsoft.public.sqlserver.programming)
  • Re: Script to stop a SQL service
    ... > Would the syntax be the same if I ran the command line script from within ... > I'm planning on running this batch file from within the BackUp Exec ... backup SQL Server databases online. ...
    (comp.databases.ms-sqlserver)
  • Re: Upsizing from Access doubles varchar columns
    ... This is trickier than it sounds because indexes ... in development and happy to drop and recreate everything then the ... Tasks> Generate Script in Enterprise Manager), ... design in Access will also be appropriate for SQL Server. ...
    (microsoft.public.sqlserver.programming)
  • Re: backing up SQL server
    ... Please go thu the script will take the UNC path as the parameter and will ... Backup Master, MSDB and all the User databases to the remote machine. ... can I reinstall and configure SQL server and then restore the ...
    (microsoft.public.sqlserver.server)
  • Recover data with updated transaction Log only
    ... I am newbie in MS SQL Server, today I wrongly run a script to clear all data of a table, and the backup is one month ago. ...
    (microsoft.public.sqlserver.server)

Loading