How do I look at column metadata in Sybase?

后端 未结 3 591
庸人自扰
庸人自扰 2021-01-12 10:37

I have a list of columns a co-worker has given to me, but these columns reside in different tables in the DB. Is there some kind of tool in Sybase where I can query the tabl

3条回答
  •  别那么骄傲
    2021-01-12 11:14

    I had to make a few small change for it to work:

    select  b.name as tablename, 
            a.name as columnname
    from    dbo.syscolumns a 
    join    sysobjects     b on a.id = b.id
    where   b.type='U' 
    and     upper(a.name) like '%FOO%'      -- wildcard search for column name
    and     b.name = 'bar'                  -- exclude tables
    order by b.name
    

提交回复
热议问题