gruber gruber - 1 year ago 93
SQL Question

drop all tables from sql ce database

Is it possible to executa a command which drops all tables from sql ce database ?

thanks for help

Answer Source

You can use information SCHEMA to generate a script:

select 'drop table ' || table_name || ';'
  from information_schema.tables;

Then run that script. You might need to run the script several times, since there is no CASCADE option (AFAIK) in SQLCE.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download