DisCopy


Sunday 17 July 2011

Sybase ASE - How to see all the column names in a database including data type.

There would be times, we need to check all the column names and data types of the columns, a scenario: when planning to migrate data etc.


The following Query gives all the column names in a database with data type. We can easily customize the Query to get a particular data type.

select object_name(id), sc.name,st.name  from syscolumns sc, systypes st

where sc.type=st.type

and sc.usertype=st.usertype

and id>29

No comments:

Post a Comment