Answers for "how to use index in sql"

SQL
0

display index in sql

SHOW INDEX FROM yourtable;
Posted by: Guest on April-20-2021
3

sql indexes

CREATE INDEX
Creates an index named ‘idx_test’ on the first_name and surname columns of
the users table. In this instance, duplicate values are allowed.
CREATE INDEX idx_test
ON users (first_name, surname);
CREATE UNIQUE INDEX
Creates an index named ‘idx_test’ on the first_name and surname columns of
the users table. In this instance, duplicate values are allowed.
CREATE UNIQUE INDEX idx_test
ON users (first_name, surname);
DROP INDEX
Creates an index named ‘idx_test’ on the first_name and surname columns of
the users table. In this instance, duplicate values are allowed.
ALTER TABLE users
DROP INDEX idx_test;
Posted by: Guest on January-07-2021
0

display index in sql

SELECT DISTINCT
    TABLE_NAME,
    INDEX_NAME
FROM INFORMATION_SCHEMA.STATISTICS
WHERE TABLE_SCHEMA = 'your_schema';
Posted by: Guest on April-20-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language