2

In sybase central is there a query to see the column length as well as the column type of a table like VARCHAR(255), VARCHAR(500)...?

i've tried this query

SELECT syscolumns.name, systypes.name FROM sysobjects 
JOIN syscolumns ON sysobjects.id = syscolumns.id
JOIN systypes ON systypes.type = syscolumns.type AND systypes.usertype=  syscolumns.usertype
WHERE sysobjects.name LIKE 'table_name' 

but i only have the column type (VARCHAR).

1 Answer 1

2

You should use the columns 'length', 'prec' or 'scale' from syscolumns, depending on the datatype.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.