The main commands in Sybase can be broadly classified into three groups. They are:-
Other important DDL command is Truncate
Where DELETE statement deletes rows from table matching specifications in WHERE clause .
TRUNCATE deallocates memory page(s) allocated for the specific table in memory and hence it is a DDL statement rather than DML. Of-course DELETE can be executed with out using WHERE calause to delete all the rows , however the page(s) are not deallocated .Additional info : DELETE statement is logged operation and hence can be rolled back where as TRUNCATE is not and hence can not be rolled back
Data Definition Language
create, drop, alter, Referential integrity statementsData Manipulation Language
select, insert, update, deleteData Control Language
grant, revokeOther important DDL command is Truncate
Where DELETE statement deletes rows from table matching specifications in WHERE clause .
TRUNCATE deallocates memory page(s) allocated for the specific table in memory and hence it is a DDL statement rather than DML. Of-course DELETE can be executed with out using WHERE calause to delete all the rows , however the page(s) are not deallocated .Additional info : DELETE statement is logged operation and hence can be rolled back where as TRUNCATE is not and hence can not be rolled back
No comments:
Post a Comment