May 18, 2014 at 3:06 am
Hello,
I'm created a new database which some tables in, I created two schema's called "Category" and "Devices"
I created a new table and called it Category.ParentCategories I then saved the table and it now appears as
dbo.Category.ParentCategories
I want it to look like this
Category.ParentCategories
but when I created the Devices table "Device.DeviceBrand" and pressed saved it didn't append "dbo" in front of it?
May 18, 2014 at 3:51 am
Did you use the table designer in Mnagement Studio?
If so, you'll need to change the schema in the properties window (F4).
Or, even better, use the SQL command CREATE TABLE in a query window.
May 18, 2014 at 4:12 am
that's correct I used the management studio to create the table, I pressed f4 but I'm unsure what I'm looking for?
May 18, 2014 at 4:24 am
If you press F4 the properties window will open. There's a parameter "Schema" with ethe value "dbo". Change it to Category.
Then create your table and save it as ParentCategories. Finally, delete the table in the wrong schema.
Alternative:
Right click the table in the Object Explorer window -> Script Table as -> Drop and Create -> new query editor window.
Then change the table name in the CREATE TABLE section from [dbo].[Category.ParentCategories] to [Category].[ParentCategories].
I'd prefer the 2nd option since this will acutally show you the SQL commands being executed.
May 18, 2014 at 4:30 am
Excellent it worked!
thanks
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply