Results 1 to 4 of 4

Thread: identifying recent inserted records in sql table

  1. #1

    Thread Starter
    Hyperactive Member yousufkhan's Avatar
    Join Date
    Jan 2002
    Location
    India
    Posts
    492

    identifying recent inserted records in sql table

    i dont have any unique id in the sql table and i have inserted some records in into the table twice by mistake now i wanted to delte those newly inserted reocords any idea how delete

  2. #2
    Frenzied Member KGComputers's Avatar
    Join Date
    Dec 2005
    Location
    Cebu, PH
    Posts
    2,024

    Re: identifying recent inserted records in sql table

    HI,

    You may use the DELETE sql command to delete it...

    Greg
    CodeBank: VB.NET & C#.NET | ASP.NET
    Programming: C# | VB.NET
    Blogs: Personal | Programming
    Projects: GitHub | jsFiddle
    ___________________________________________________________________________________

    Rating someone's post is a way of saying Thanks...

  3. #3

    Thread Starter
    Hyperactive Member yousufkhan's Avatar
    Join Date
    Jan 2002
    Location
    India
    Posts
    492

    Re: identifying recent inserted records in sql table

    that i also know to use the delete command but i want to delete only newly added records

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: identifying recent inserted records in sql table

    Do you mean that you have created exact copies of existing records?

    If so, you can't edit/delete any of the copies (the 'old' or 'new) individually, only all of them at once. As editing them will mean they are still the same as each other, that won't do you any good.. so what you need to do is delete them all, and then re-add the ones you want to keep.


    Alternatively, simply do what you should have done in the first place... add a unique field to the table (due to your situation, it will need to be an Identity/AutoNumber for now), and then do your editing/deleting.

Posting Permissions

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



Click Here to Expand Forum to Full Width