Oracle INSTR Function


/ Published in: SQL
Save to your folder(s)

A few examples of the Oracle INSTR function.


Copy this code and paste it in your HTML
  1. /*INSTR*/
  2.  
  3. /*Example 1*/
  4. SELECT INSTR('Melbourne, Australia', 'e') FROM DUAL;
  5.  
  6. /*Example 2*/
  7. SELECT INSTR('Melbourne, Australia', 'm') FROM DUAL;
  8.  
  9. /*Example 3*/
  10. SELECT INSTR('Melbourne, Australia', 'M') FROM DUAL;
  11.  
  12. /*Example 4*/
  13. SELECT INSTR('Melbourne, Australia', 'e', 1, 2) FROM DUAL;
  14.  
  15. /*Example 5*/
  16. SELECT INSTR('Melbourne, Australia', 'e', 5, 1) FROM DUAL;
  17.  
  18. /*Example 6*/
  19. SELECT INSTR('Melbourne, Australia', 'e', 5, 2) FROM DUAL;
  20.  
  21. /*Example 7*/
  22. SELECT INSTR('Melbourne, Australia', 'bou') FROM DUAL;
  23.  
  24. /*Example 8*/
  25. SELECT INSTR('Melbourne, Australia', 'a', -1) FROM DUAL;
  26.  
  27. /*Example 9*/
  28. SELECT INSTR('Melbourne, Australia', 'a', -1, 2) FROM DUAL;

URL: http://www.databasestar.com/oracle-instr/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.