How to check the index(es) in a table in a database?



Use the queries below to show the index of your table:
  • For MySQL or MariaDB:

            SQL: SHOW INDEX FROM your_table_name;

  • For PostgreSQL:

            SQL: SELECT * FROM pg_indexes WHERE tablename = 'your_table_name';

  • For SQL Server:

            SQL: EXEC sp_helpindex 'your_table_name';

  • For Oracle:

            SQL: SELECT index_name FROM all_indexes WHERE table_name = 'your_table_name';




Post a Comment

Previous Post Next Post