I know that we cannot use where clause with truncate..But i want to delete some records in a table by keeping other records as usual by using truncate...
Can we do that??
I know that we cannot use where clause with truncate..But i want to delete some records in a table by keeping other records as usual by using truncate...
Can we do that??
No, TRUNCATE is all or nothing. You can do a
DELETE FROM <table> WHERE <conditions>
but this loses the speed advantages of TRUNCATE.
This thread is a good read :)