G
Grey Alien
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 ?
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 ?