Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2004
    Location
    Chicago
    Posts
    54

    Unanswered: Where did my index go?

    I created my index using this:

    CREATE INDEX index2 ON schma.dbo.table2 (...)

    The index was created. I cannot find it anywhere. Should it be in schma.dbo?

    Should the index be created like this (like DB2, Oracle)?

    CREATE INDEX schma.dbo.index2 ON schma.dbo.table2 (...)


    Thanks.

    Bruce
    Last edited by jin007; 05-05-10 at 10:48.

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Your syntax is correct, assuming you have a database called schma.
    Where did you expect to "find" it?

  3. #3
    Join Date
    Jan 2004
    Location
    Chicago
    Posts
    54
    Thanks pootle.

    When I create a table I can see it under schema.dbo.
    But when I create an index I cannot see it.

    My tables belong to schema.dbo. I wonder why my index does not belong to schema.dbo?

    Thanks

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Assuming you are using SQL 2005 or later, you can find indexes under the table in SSMS. You can also query the sys.indexes view for the index in question. In SQL Server, indexes do not have a schema in and of themselves. They are not really considered to be schema objects.

  5. #5
    Join Date
    Jan 2004
    Location
    Chicago
    Posts
    54
    Thanks MC.
    I will try that.

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Which engine are you using?

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •