Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 craete table syntax

Author  Topic 

asfia
Starting Member

2 Posts

Posted - 2007-06-05 : 07:07:37
hi..
i want to know how to create table while specifying the database name..
the syntax given in the help is this

CREATE TABLE
[ database_name.[ owner ] . | owner. ] table_name
but i cant seem to do it.. it always generates an error whenever i give my database name..

Kristen
Test

22859 Posts

Posted - 2007-06-05 : 07:11:04
This maybe?

USE database_name

CREATE TABLE ...

Kristen
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-05 : 07:12:43
quote:
Originally posted by Kristen

This maybe?

USE database_name
GO
CREATE TABLE ...

Kristen



Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

asfia
Starting Member

2 Posts

Posted - 2007-06-05 : 07:26:10
thanks
Go to Top of Page

AndyB13
Aged Yak Warrior

583 Posts

Posted - 2007-06-05 : 08:29:50
CREATE TABLE Northwind.dbo.MyTestTable(Col1 int)



Beauty is in the eyes of the beerholder
Go to Top of Page
   

- Advertisement -