Can't ask T-SQL question

Mark McCumber 431 Reputation points
2022-08-16T14:23:35.16+00:00

I have a SQL that I can't debug. However I can't post it. Why?

Thanks,
MRM256

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,811 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,558 questions
{count} votes

Accepted answer
  1. Tom Cooper 8,466 Reputation points
    2022-08-16T20:03:02.027+00:00

    There are several errors in what you posted. The following should work

    CREATE TABLE [tblStates](  
    [StateID] [int] NOT NULL IDENTITY,  
    [State] [varchar](30) NOT NULL,  
    [StateAbbrv] varchar(2) NOT NULL,  
    CONSTRAINT PK_tblStates PRIMARY KEY CLUSTERED  
    (  
     StateID  
    )  
    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]  
    ) ON [PRIMARY]  
    GO  
      
    

    Tom


1 additional answer

Sort by: Most helpful
  1. Mark McCumber 431 Reputation points
    2022-08-16T18:22:57.77+00:00

    Can't post SQL to this site.

    0 comments No comments