All we need is an easy explanation of the problem, so here it is.
I’m trying to create a new table based on an existing table.
In the existing one, there are two columns that are
sysname data type.
But when I’m trying to create the new one with
sysname, SSMS shows
Invalid data type
My SQL Server version is Microsoft SQL Server 2019 (RTM-GDR) (KB5014356) – 15.0.2095.3 (X64)
SSMS version is 15.0.18390.0
How to solve :
I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.
The table designer is very limited and has a number of unresolved defects.
Most professionals choose to write T-SQL
CREATE TABLE statements instead.
You will have noticed
sysname is not available in the drop-down list of type names.
This is probably because it is a synonym (for
nvarchar(128)) rather than a base type.
If you want to leave feedback for Microsoft about this, you can do so at https://aka.ms/sqlfeedback
Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂