I am writing a basic DBMS package and I am trying to retrieve the column length. This is the query I am using to retrieve the infomation:
SELECT COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME = 'testVariables' This works fine, no issues except for CHARACTER_MAXIMUM_LENGTH returns -1 all the time, When I use SQL Management Studio it says the column length is 16...
Any ideas?
Cheers, Joel