Sybase Question:
Download Questions PDF

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:

1. select object_name(id) "table",name "column", prec "precision"
2. from syscolumns
3. where convert(bit, (status & 0x80)) = 1
4. 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.

Download Sybase Interview Questions And Answers PDF

Previous QuestionNext Question
Explain about the Sybase group?How do I Configure the burn factor in Sybase?