views:

60

answers:

3

I created a SQL script to create a table. Can you please go through it and see if there are any error, or if there is missing something in that script? Or you can tell me any better idea to create table?

use nors 
go

CREATE TABLE t_data_dnefrc
(
"RTN", adVarChar, 9
AccountNbr adVarChar(17) PRIMARY KEY,
FirstName adVarChar(50),
MiddleName adVarChar(1),
LastName adVarChar(50),
Amount dECIMAL(18,2)
)
go
+1  A: 

How to create a table.

John Paulett
+1  A: 

if this is what you are looking for try this

CREATE TABLE t_data_dnefrc
    (
    RTN  VarChar(9),
    AccountNbr VarChar(17) PRIMARY KEY,
    FirstName VarChar(50),
    MiddleName VarChar(1),
    LastName VarChar(50),
    Amount DECIMAL(18,2)
    )
astander
A: 

Also to help you out you can right click any table in SQL Server management studio and have it export a CREATE statement in a new query window or a .sql file.

Just an FYI

JonH