T-SQL Tutorial

Msg 343 Level 15 - Unknown object type used in a CREATE, DROP, or ALTER statement


On Transact SQL language the Msg 343 Level 15 - Transact sql error message Msg 343 Level 15 - Unknown object type used in a CREATE, DROP, or ALTER statement.

Msg 343 Level 15 Example:

Invalid alter table:

USE model;
GO
ALTER students ADD dep_id INT;
GO

Message
Msg 343, Level 15, State 1, Line 1
Unknown object type 'students' used in a CREATE, DROP, or ALTER statement.
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'dep_id'.




Correct alter table:

USE model;
GO
ALTER TABLE students ADD dep_id INT;
GO

Message
Command(s) completed successfully.

Other error messages: