Is there a way to generate the sql statement for tables in sql server compact ? same as for sql server express+ ?
Essentially a create table( .... ) statement as output ?
Is there a way to generate the sql statement for tables in sql server compact ? same as for sql server express+ ?
Essentially a create table( .... ) statement as output ?
You can connect to SQL Server Compact Edition using SQL Server Management Studio(SSMS), which in turn allows you to script out all database objects.
Please refer to: Managing SQL Server Compact Edition with SQL Server Management Studio
and then also, How to: Generate a Script
Using SQL Server Management Studio (a separate download) to export a "create database" script is the best way to go.
An alternative method, but more difficult/advanced method is to use SQuirreL database export plugin to create a script with JDBC.
I've used SQL servers own tool to generate scripts for years and that is the fastest and easiest.
There is a tool to do this. Check out http://www.antipodeansoftware.com/Home/Products This will iterate the entire SQL server, and write all the table, view, stored procedure and UDF scripts to a local drive. Great for adding SQL schema or DDL to source control.