SQL: Storing the names of objects in SQL Server tables and variables
When I’m writing SQL Server scripts, I often need to store the name of SQL Server objects (like databases, schemas, tables, procedures, etc.) in variables.
That can also happen when I’m creating tables. I might need to store a SQL Server object name (like a login name or a user name) in a column of a table.
So which data type should be used? varchar(100), varchar(200), nvarchar(max), etc. etc. ??
2019-05-24
