DEV Community

Query Filter
Query Filter

Posted on

sybase

SELECT
    c.colid        AS column_number,
    c.name         AS column_name,
    t.name         AS column_type,
    c.length       AS length,
    c.prec         AS precision,
    c.scale        AS scale
FROM syscolumns c
JOIN systypes t
  ON c.usertype = t.usertype
JOIN sysobjects o
  ON c.id = o.id
WHERE o.name = 'your_table_name'
ORDER BY c.colid;
Enter fullscreen mode Exit fullscreen mode

Top comments (0)