a while back I created many tables in a new db, they were created
using the 'management studio' and the schema is 'zinquiry'
today's I created a new table, and its schema is dbo
how can I specify the schema before creating a table
how can I change the schema once the table is created
Plamen Ratchev - 31 May 2008 03:51 GMT
You use ALTER SCHEMA to transfer a table from one schema to another:
ALTER SCHEMA target_schema TRANSFER source_schema.table_name;
To create the table under a specific schema just reference the schema name
when creating the table:
CREATE TABLE Schema.Foo (
keycol INT PRIMARY KEY,
datacol CHAR(1));
HTH,
Plamen Ratchev
http://www.SQLStudio.com
Roger - 31 May 2008 14:37 GMT
> You use ALTER SCHEMA to transfer a table from one schema to another:
>
[quoted text clipped - 10 lines]
>
> Plamen Ratchevhttp://www.SQLStudio.com
cool.. thanx