A table, like this,
create table emp(name varchar2(25));
If I use the SQL,
select * from emp where decode(name,:name,1)=1;
How can I create an index for name(with decode function)? Because there is a bind variable in decode not a constant value.
SQL> create index idx_e_01 on emp(decode(name,:name,1));
create index idx_e_01 on emp(decode(name,:name,1))
*
ERROR at line 1:
ORA-01027: bind variables not allowed for data definition operations
Thanks.