GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL Plus
Go To First  |  Previous Question  |  Next Question 
 SQL Plus  |  Question 71 of 132    Print  
Difference between SUBSTR and INSTR ?
INSTR (String1,String2(n,(m)),INSTR returns the position of the mth occurrence of the string 2 instring1. The search begins from nth position of string1.SUBSTR (String1 n,m)SUBSTR returns a character string of size m in string1, starting from nth position of string1.


  
Total Answers and Comments: 2 Last Update: December 07, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 27, 2006 03:18:46   #1  
tarun1282 Member Since: April 2006   Contribution: 11    

RE: Difference between SUBSTR and INSTR ?
substr is used to get a sub part of a string but instr is a function that returns the position of a specific character and also according to it's occurence in that string.
 
Is this answer useful? Yes | No
December 07, 2006 09:59:36   #2  
rampratap409 Member Since: September 2006   Contribution: 111    

RE: Difference between SUBSTR and INSTR ?

substr is used to get a part of given string

instr is used to search a charcter in the given string.

select substr(ename 1 3) three_charename instr(ename 'A' 1) a_present_at from emp;


 
Is this answer useful? Yes | No

 Related Questions

Answer posted by Scott on 2005-05-25 18:30:04: TRUNCATE is a DDL command and cannot be rolled back. All of the memory space is released back to the server. DELETE is a DML command and can be rolled 
Latest Answer : DELETE is a logged operation on a per row basis.  This means that the deletion of each row gets logged and physically deleted. You can DELETE any row that will not violate a constraint, while leaving the foreign key or any other contraint in place. ...

Latest Answer : Hi All,INSTR function finds the numeric starting position of a string within a string.As eg.Select INSTR('Mississippi','i',3,3) test1,         INSTR('Mississippi','i',1,3) test2,         ...

Latest Answer : Can anyone tell me the diffrence between CHAR and VARCHAR2(1)...why do we use char when we can give it as varchar2(1)..????Thanks in advance.. ...

TRUNCATE commits after deleting entire table i.e., can not be rolled back. Database triggers do not fire on TRUNCATEDELETE allows the filtered deletion. Deleted records can be rolled back or committed.Database 
Latest Answer : Truncate is faster than delete as it does not generate rollback segment. ...

INSTR (String1,String2(n,(m)),INSTR returns the position of the mth occurrence of the string 2 instring1. The search begins from nth position of string1.SUBSTR (String1 n,m)SUBSTR returns a character 
Latest Answer : substr is used to get a part of given string,instr is used to search a charcter in the given string.select substr(ename,1,3) three_charename, instr(ename,'A',1) a_present_at from emp; ...

What is difference between CHAR and VARCHAR2 ? What is the maximum SIZE allowed for each type ?
CHAR pads blank spaces to the maximum length. VARCHAR2 does not pad blank spaces. For CHAR it is 255 and 2000 for VARCHAR2. 

Latest Answer : Inner jon Or equi join  is The query that retrives the rows that exact match using (=) sign in where clause ...
Read Answers (6) | Asked by : na123

Latest Answer : View is a subset of data derived from tableupdate of data in table we can see in in viewbut update in view can not see in table. ...

Latest Answer : materialized view is physical duplicate data in a table view is logical representation of table ...

Latest Answer : Commit to like making all the changes permanently in the Server...But in case of GO statement which is available In SQL Server(TSQL), the set of steps before the GO statement is complied at once and sent to server...I mean from the beginning of the script ...
Read Answers (5) | Asked by : Manu


 Sponsored Links

 
Related Articles

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Using Oracle XML DB Repository

Using Oracle XML DB Repository Another variation on accessing and manipulating XML content stored in Oracle database is provided by Oracle XML DB repository which is an essential component of Oracle XML DB mosgoogle NOTE Oracle XML DB repository also known as XML repository is a hierarchically organ
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

XML Processing in PHP and Oracle Applications

Processing XML in PHP Oracle Applications As mentioned there are two alternatives when it comes to performing XML processing in your PHP Oracle application You can perform any required XML processing using either PHP s XML extensions or PEAR XML packages or Oracle s XML features mosgoogle In the fol
 

PHP Oracle Web Development

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax is a good starting b
 

Getting Started with Oracle and ODP.NET

ODP NET Developer’ s Guide by Jagadish Chatarji Pulakhandam Sunitha Paruchuri A practical guide for developers working with the Oracle Data Provider for NET and the Oracle Developer Tools for Visual Studio 2005 Application development with ODP NET Dealing with XML DB using ODP NET Oracle
 

PHP Oracle Web Development Review

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books The author is also an expert in open source technologies and SOA Service Oriented Architecture But besides
 

Step by Step Oracle PL-SQL Tutorial

This introductory tutorial to PL SQL will help you to understand the basic concepts of PL SQL Please review the following tutorials and practice the sample SQL Statements on your local Oracle Database Please note that you must learn these basic things before we actually start getting in to Advanced
 

Working with XML in Oracle

Working with XML in Oracle Introduction to XML Extensive markup language is the language which presents data in a human readable form of text The data can be anything from a purchase order or a stock quote or weather radar or a flight schedule it can be represented using XML XML is very similar to H
 

What is Oracle Net Service

Oracle Net Services provides enterprise-wide connectivity solutions in distributed, heterogeneous computing environments. Oracle Net Services eases the complexities of network configuration and management, maximizes performance, and improves network diagnostic capabilities. Oracle Net, a component
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape