Check primary key and constraint and Catalog :
Note:- It is also unique and it is also a primary key. Both of these properties are property of primary key, so when we created primary key it automatically contains unique value, as well as created index .It is very clear that even though we do not see a dedicated entry in indexes table, Index is definitely created on sampletable
Create table sampletable( Id int primary key,name varchar (10));
Example : For create index
Ceate the index SampleTable_id on table Sampletable, and query is executed successfully.
Now To verify that, let's execute this statement, Now we can see two different entries in this table. We can see here is the name of index which we have just created However, we had not specified unique index column is false. Now you can clearly see that when we had created primary key on this table it had automatically behind the scene created index Even though this index entry was not visible in Object Brower,
No comments:
Post a Comment