Converting Oracle query to MySQL query. all_indexes -


i'm trying convert oracle query mysql query.

my oracle query has this:

create or replace procedure myproc()     iname all_indexes.index_name%type;     oname all_indexes.owner%type; begin     // end; 

how can port mysql, since mysql doesn't have all_indexes public environment variable?

just use varchar datatype

create or replace procedure myproc() begin   declare iname varchar(50);   declare oname varchar(50);      // end; 

you can query information_schema.statistics obtain names od indexes

select *  information_schema.statistics 

demo:http://sqlfiddle.com/#!9/88321/1


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -