January 16, 2020 at 1:41 am
I am trying the following code and I'm getting an error that says, Incorrect syntax near '.'
DBCC checkident (dbo.IdentityExample, RESEED, 10);
What is wrong with this code?
January 16, 2020 at 8:05 am
did you even bothered reading the manual?
January 16, 2020 at 2:07 pm
Try it with quotes around the table name.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 26, 2020 at 4:30 am
That worked. When I do CREATE TABLE or INSERT INTO, the table name doesn't need quotes. How do you know when a table name needs quotes?
January 26, 2020 at 6:45 am
That worked. When I do CREATE TABLE or INSERT INTO, the table name doesn't need quotes. How do you know when a table name needs quotes?
I found this from the manual
table_name
Is the name of the table for which to check the current identity value. The table specified must contain an identity column. Table names must follow the rules for identifiers. Two or three part names must be delimited, such as 'Person.AddressType' or [Person.AddressType].
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply