如何使用SQL获取Sybase ASE中的列类型

问题描述 投票:0回答:1

我可以使用什么SQL来获取Sybase ASE中列的类型?

sql sybase sybase-ase
1个回答
0
投票
给出一个名为“ fruit”的表和一个名为“ color”的列:

select obj.name as "table", col.name as "column", type.name as "type" from sysobjects obj join syscolumns col on obj.id=col.id join systypes type on col.type=type.type and col.usertype = type.usertype where obj.type = "U" -- means 'U'ser table and user_name(obj.uid) = 'dbo' -- or whatever the user is who owns/created the table and obj.name = 'fruit' and col.name = 'color'

© www.soinside.com 2019 - 2024. All rights reserved.