Results 1 to 11 of 11
  1. #1
    Join Date
    Jan 2004
    Posts
    50

    Unanswered: Undelet rows ????????

    Hi all,
    I had been delete some rows from a table.
    Can i do undelete it?
    thanh for reading.

  2. #2
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    No Begin tran ???

    No backup ???

    Better start typing ....

    or you can try www.lumigent.com if its super duper critical
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  3. #3
    Join Date
    Jan 2004
    Posts
    50
    Originally posted by Enigma
    No Begin tran ???

    No backup ???

    Better start typing ....

    or you can try www.lumigent.com if its super duper critical
    yes, i did not backup, and not begin tran.
    If i begin tran, how can i undelete it and how can i begin tran. please show me.
    thanks alot.

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Code:
    USE Northwind
    GO
    
    SELECT * INTO New_Orders FROM Orders
    
    BEGIN TRAN
    
    SELECT COUNT(*) AS New_Count FROM New_orders 
    
    DELETE FROM New_Orders
    
    SELECT COUNT(*) AS New_Count FROM New_orders
    
    ROLLBACK TRAN
    GO
    
    SELECT COUNT(*) AS New_Count FROM New_orders
    
    DROP TABLE New_Orders
    GO
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Jan 2004
    Posts
    50
    Originally posted by Brett Kaiser
    Code:
    USE Northwind
    GO
    
    SELECT * INTO New_Orders FROM Orders
    
    BEGIN TRAN
    
    SELECT COUNT(*) AS New_Count FROM New_orders 
    
    DELETE FROM New_Orders
    
    SELECT COUNT(*) AS New_Count FROM New_orders
    
    ROLLBACK TRAN
    GO
    
    SELECT COUNT(*) AS New_Count FROM New_orders
    
    DROP TABLE New_Orders
    GO
    Thank you,

  6. #6
    Join Date
    Sep 2003
    Posts
    522
    Last edited by ms_sql_dba; 02-20-04 at 01:17.

  7. #7
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    http://www.dbforums.com/search.php?a...by=&sortorder=

    You missed out on some of them ...

    Well .. from the looks of it .. he is trying to learn MS SQL Server.
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  8. #8
    Join Date
    Jan 2004
    Posts
    50
    Originally posted by Enigma
    http://www.dbforums.com/search.php?a...by=&sortorder=

    You missed out on some of them ...

    Well .. from the looks of it .. he is trying to learn MS SQL Server.
    Hi,
    I 'd like to become a SQL server database administrator .

    best regard,

  9. #9
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    Originally posted by thanhtung2003
    Hi,
    I 'd like to become a SQL server database administrator .

    best regard,
    Well then .. you definitely need to get the Holy Book
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  10. #10
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Originally posted by Enigma
    Well then .. you definitely need to get the Holy Book
    Yeah but that's just a reference guide (more or less)

    Check out

    http://www.sqlteam.com/store.asp
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  11. #11
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    EDIT: And at least s/he says thank you....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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