Next / Previous / Index / ITC Help System / Publications / Site map / NM Tech homepage

Example of a Sybase composite index

Tech Computer Center logo

For example, to create an composite index called zipidx on a column called zip and a column called number in a table called rolodex, type

        create index zipidx on rolodex (zip,number)
        go

If you see

        Msg 1906, Level 16, State 1
        Server '', Line 1
        Cannot create an index on table 'oanda', because this table
            does not exist in database 'pubs2'.
you have tried to index a table that doesn't exist. Most likely, you mis-typed the table name. Run your index command again, making sure to type the right table name.

If you see

        Msg 1919, Level 16, State 1
        Server '', Line 1
        Column 'first_name' -- Can't create index on a column
            of TEXT or IMAGE datatype.
        Msg 1919, Level 16, State 1
        Server '', Line 1
        Column 'last_name' -- Can't create index on a column
            of TEXT or IMAGE data type
you've tried to create an index on a column with text of image as its datatype. That's not allowed, try another column.
Next: Deleting a Sybase index
See also: Indexing Sybase tables
Previous: Creating a Sybase composite index
Site map
Index: Keyword index to help pages
Help: New Mexico Tech Information Technology and Communications: Help System
ITC Publications
To report a problem: File a ticket
Send mail to the User consultant on duty or call them at 575-835-5437
Home: About New Mexico Tech

Maintained by John Shipman, john@nmt.edu; original by Steve Anderson
Last updated: 1997/06/23 22:26:37 UT
URL: http://www.nmt.edu/tcc/help/db/sybase/comp_example.html
QR two-dimensional bar code