/ Published in: SQL
A few examples of the Oracle INSTR function.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/*INSTR*/ /*Example 1*/ SELECT INSTR('Melbourne, Australia', 'e') FROM DUAL; /*Example 2*/ SELECT INSTR('Melbourne, Australia', 'm') FROM DUAL; /*Example 3*/ SELECT INSTR('Melbourne, Australia', 'M') FROM DUAL; /*Example 4*/ SELECT INSTR('Melbourne, Australia', 'e', 1, 2) FROM DUAL; /*Example 5*/ SELECT INSTR('Melbourne, Australia', 'e', 5, 1) FROM DUAL; /*Example 6*/ SELECT INSTR('Melbourne, Australia', 'e', 5, 2) FROM DUAL; /*Example 7*/ SELECT INSTR('Melbourne, Australia', 'bou') FROM DUAL; /*Example 8*/ SELECT INSTR('Melbourne, Australia', 'a', -1) FROM DUAL; /*Example 9*/ SELECT INSTR('Melbourne, Australia', 'a', -1, 2) FROM DUAL;
URL: http://www.databasestar.com/oracle-instr/