PostgreSQL: Can you create an index in the CREATE TABLE definition?

前端 未结 3 734
既然无缘
既然无缘 2020-12-24 00:11

I want to add indexes to some of the columns in a table on creation. Is there are way to add them to the CREATE TABLE definition or do I have to add them afterward with anot

3条回答
  •  无人及你
    2020-12-24 00:51

    No.

    However, you can create unique indexes in the create, but that's because they are classed as constraints. You can't create a "general" index.

提交回复
热议问题