Returns an index name, when you provide the index ID, the database ID, and the object on which the index is defined.
index_name(dbid, objid, indid)
select index_name(db_id("testdb"), object_id("testdb...tab_apl"),1) ------------
select index_name(NULL,object_id("testdb..tab_apl"),1) --------------------------
select index_name(db_id("testdb"), object_id("testdb..tab_apl"),1) -----------------------------
Uses the current database ID, if you pass a NULL value in the dbid parameter
Returns NULL if you pass a NULL value in the dbid parameter.
Returns the object name, if the index ID is 0, and you pass valid inputs for the object ID and the database ID.
Any user can execute index_name.