Professional Web Applications Themes

an easy Q - Microsoft SQL / MS SQL Server

Truncate the table. This will delete all data, preserve your constraints, etc, and reset the identity column. "Rick" <com> wrote in message news:054301c34d7c$ab95f1c0$gbl... ...

  1. #1

    Default Re: an easy Q

    Truncate the table. This will delete all data, preserve your constraints,
    etc, and reset the identity column.

    "Rick" <com> wrote in message
    news:054301c34d7c$ab95f1c0$gbl... 


    Rob Guest

  2. #2

    Default Re: an easy Q

    On Fri, 18 Jul 2003 15:33:54 -0700, "Rick"
    <com> wrote: 

    Truncate table yourtable.

    J.

    JXStern Guest

  3. #3

    Default Re: an easy Q

    Rick,

    Not clear about what you meant by constraints.If this table doesnt have
    other foreign keys referencing it , then you can use TRUNCATE TABLE.This
    action should delete all rows and also resets the IDENTITY column, both in
    one shot. In case, the table has other foreign keys referencing it, then you
    may have to use DELETE FROM <tablename> to delete all rows and use DBCC
    CHECKIDENT (<tablename>, RESEED, 0) to reset the IDENTITY.

    --
    Dinesh.
    SQL Server FAQ at
    http://www.tkdinesh.com

    "Rick" <com> wrote in message
    news:054301c34d7c$ab95f1c0$gbl... 


    Dinesh.T.K Guest

Similar Threads

  1. Do you know CF? This one should be easy
    By Swampie in forum Macromedia ColdFusion
    Replies: 2
    Last Post: April 29th, 05:58 AM
  2. here is an easy one
    By darkwater99 webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 1
    Last Post: November 3rd, 02:33 PM
  3. Easy question = easy answer?
    By Jyry webforumsuser@macromedia.com in forum Macromedia Freehand
    Replies: 4
    Last Post: September 29th, 03:29 PM
  4. Easy Question/Easy Answer
    By ChuckyJ webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 1
    Last Post: July 12th, 01:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139