Creating db from SQL statements
- From: Grey Alien <grey@xxxxxxxxxxxxx>
- Date: Mon, 09 Jul 2007 11:06:06 +0100
I have created a database (*.df) file for use with my website. I have files containing DDL and DDM for creating the db schema and stored procedures respectively. However, I have not (as yet) founs out how to "import" the SQL statements into the datbase, to create the required database objects. I would appreciate any help/info that will help me generate the db objects from the SQL statements.
Additionally, I need to 'port' my SQL from PostgreSQl to SQL Server SQL. I would like to use ANSI-SQL as much as possible, and avoid using SQL specific SQL wherever possible. My tables typically look something like this:
CREATE TABLE foobar_def(
id SERIAL PRIMARY KEY,
fkid integer references sometable(id) NOT NULL ON DELETE CASCADE,
name varchar(32) NOT NULL,
kval integer CHECK (kval between 1 and 3) NOT NULL
);
CREATE INDEX fb_idx ON foobar_def (name, kval);
What would be the equivalent syntax to create this table (and index) in SQL Server?
Any one has links to the SQL Server SQL guide ?
.
- Follow-Ups:
- Re: Creating db from SQL statements
- From: bruce barker
- Re: Creating db from SQL statements
- From: Mark Rae [MVP]
- Re: Creating db from SQL statements
- Prev by Date: Re: Master page postback.. !IsPostback doesnt work
- Next by Date: Re: Model View Presenter ?
- Previous by thread: Master page postback.. !IsPostback doesnt work
- Next by thread: Re: Creating db from SQL statements
- Index(es):
Relevant Pages
|