Mega Code Archive

 
Categories / MSSQL Tutorial / System Tables Views
 

Select FROM sysindexes WHERE id = object_id(HasText)

3>  CREATE TABLE HasText 4> ( 5> Col1 char(3)       NOT NULL, 6> Col2 text          NOT NULL, 7> Col3 varchar(5)    NULL, 8> Col4 varchar(20)   NOT NULL, 9> Col5 smallint      NULL 10> ) 11> GO 1> 2> INSERT HasText VALUES 3>     ('AAA', REPLICATE('X', 250), NULL, 'ABC', 123) 4> GO (1 rows affected) 1> 2> SELECT indid, first, name FROM sysindexes 3>     WHERE id = object_id('HasText') 4> GO indid  first                                                                                                                           name ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------ --------------------------------------------------      0 0x7E0000000100                                                                                                                           NULL (1 rows affected) 1> 2> 3> drop table HasText; 4> GO 1>