Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Microsoft SQL Server
Versions des environnements
SQL Server:
SQL Server 2012
>Here's a little brain teaser. This could be a "who's buried in Grant's tomb" question....or it might be a trick question.
>
>Here we go. In SQL Server, suppose you're in a SQL transaction. During the transaction, you truncate a table by issuing the TRUNCATE TABLE statement. Let's say the table had 100 rows before the TRUNCATE.
>
>Here's the question - can you issue a ROLLBACK statement and bring back the 100 rows?
>
>
>Obviously, you could cheat and try it out in SQL Server, so I'm asking for honesty.
>
>There's a story behind this question.....
Kevin,
From the top of my head, I don't think its possible to do a rollback. TRUNCATE TABLE is one comparable to ZAP in xBase, taking the fast and easy route to empty a table. It does not log the delete from the rows that are deleted, so I'd say no.
I bet you are going to tell use that in some version of SQL server, you are able to that, are you ?
Walter,
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement