Error: Unknown object type ” used in a CREATE, DROP, or ALTER statement.


Error: Unknown object type ” used in a CREATE, DROP, or ALTER statement.

Description: When we try to use an unknown type in SQL statements, the exception throws.

CREATE table1
(
name nvarchar(10)
)

Here the complete syntax is missing. CREATE is the object but the type is missing. SQL Server trying to use table1 as the object type instead of TABLE.

Solution: Use the complete correct syntax.

CREATE TABLE table1
(
name nvarchar(10)
)

CREATE FUNCTION func1
  RETURNS int....
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s