-
Unable to create table in a new database
Hey guys,
Hopefully there is an easy and painfully obvious answer that I've missed somewhere. I'm unable to create a table in my new database. Whenever I create a table, it seems to auto redirect to the master database not the database I created.
Any ideas?
-
Never mind,
I dunno why it was being fussy, but after a 3rd restart and trying the same steps (right click on my database-->new query) it let me add tables.
Stupid thing
-
Ensure you choose right db to run the script.
-
Check Sample script to create table :
USE [DatabaseName]
GO
CREATE TABLE [dbo].[TableName](
Column1 [int] ,
Column2 [nchar](5) NULL,
Column3 [int] NULL,
Column4 [Varchar](50) NULL,
Column5 [datetime] NULL,
Column6 [datetime] NULL,
Column7 [money] NULL,
Column8 [nvarchar](40) NULL
)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|