Share via

Can't ask T-SQL question

Mark McCumber 436 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

Developer technologies | Transact-SQL
Developer technologies | Transact-SQL

A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


Answer accepted by question author

Tom Cooper 8,501 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

Was this answer helpful?


1 additional answer

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

    Can't post SQL to this site.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.