How to delete all data in a table in SQL CE?
问题 SQL CE does not support TRUNCATE command. To clear a table I have to use DELETE. Is there a quicker/better way to clear the data then the following command? DELETE FROM FooTable WHERE id !='ABC' 回答1: You don't have any better way to do that, DELETE is the SQL Command for SQL CE to DELETE ROWS, anyway TRUNCATE TABLE deletes every row in a table, so your DELETE query must be executed also at SQL Server if you want to DELETE all the rows with id different from 'ABC'. In the case you want to