1.

How Do I Tell Which Tables Have Identities In Sybase?

Answer»

You can tell if a table has IDENTITIES one of two ways:
1. sp_help [tablename]: there is a field INCLUDED in the sp_help output
describing a table called “IDENTITY.” It is SET to 1 for identity fields, 0 otherwise.
2. Within a database, execute this query:

  •  select object_name(id) “table”,name “column”, prec “precision”
  •  from syscolumns
  •  where convert(bit, (status & 0x80)) = 1
  •  go

this will list all the tables and the field within the table that serves as an identity, and the size of the identity field.

You can tell if a table has identities one of two ways:
1. sp_help [tablename]: there is a field included in the sp_help output
describing a table called “Identity.” It is set to 1 for identity fields, 0 otherwise.
2. Within a database, execute this query:

this will list all the tables and the field within the table that serves as an identity, and the size of the identity field.



Discussion

No Comment Found