SELECT COUNT1 IndexIsThere FROM INFORMATION_SCHEMASTATISTICS WHERE table_schemaDATABASE AND table_namemytable AND index_nameindex_name. If names in the column usually differ in the first 10 characters lookups performed using this index should not be much slower than using an index created from the entire name. Mysql Create Index If Not Exists Database Administrators Stack Exchange That being said it is far from impossible. . So I get a NULL result or a single Line result. Set sqlstmt if exist 0 select INFO. SELECT CONCAT Index given_index Already Exists on Table given_database. If you want to keep the same value for c you can do an update with the same value. Perhaps you can write a stored procedure to create an index on the table of your. Create unique index if not exists index_client_ref on And this is the exception im getting. IF EXISTSSELECT FROM sysindexes WHERE object_id object_idschematablename AND
Comments
Post a Comment