Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 864
gruber Avatar asked Nov 21 '25 03:11

gruber


1 Answers

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.

like image 82
Pablo Santa Cruz Avatar answered Nov 24 '25 19:11

Pablo Santa Cruz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!