Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No entirely. DELETE will work with cascading foreign keys, while TRUNCATE will not, at least on SQL Server. Also, DELETE is logged and (I believe) TRUNCATE is not. Having said that, I agree that a WHERE clause should be required - you can always say "WHERE 1=1" or similar if you really mean to delete all rows.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: