Difference between SUBSTR and INSTR ?

1 Answer

Answer :

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.

Related questions

Description : What is difference between SUBSTR and INSTR?

Last Answer : SUBSTR returns a specified portion of a string eg SUBSTR('BCDEF',4) output BCDE INSTR provides character position in which a pattern is found in a string. eg INSTR('ABC-DC-F','-',2) output 7 (2nd occurence of '-')

Description : What is the difference between DBFile Sequential and Scattered Reads?(for DBA

Last Answer : Both "db file sequential read" and "db file scattered read" events signify time waited for I/O read requests to complete. Time is reported in 100's of a second for Oracle 8i releases and below, ... v_$system_event b where a.event = 'db file sequential read' and b.event = 'db file scattered read';

Description : What is the difference between static and dynamic lov

Last Answer : The static lov contains the predetermined values while the dynamic lov contains values that come at run time

Description : What is the difference between NAME_IN and COPY ?

Last Answer : Copy is package procedure and writes values into a field. Name in is a package function and returns the contents of the variable to which you apply.

Description : What is the difference between restoring and recovering? (for DBA

Last Answer : Restoring involves copying backup files from secondary storage (backup media) to disk. This can be done to replace damaged files or to copy/move a database to a new location. Recovery is the process ... as SYSDBA Sql> RECOVER DATABASE UNTIL TIME '2001-03-06:16:00:00' USING BACKUP CONTROLFILE;

Description : What is the difference between online and offline backups? (for DBA

Last Answer : A hot backup is a backup performed while the database is online and available for read/write. Except for Oracle exports, one can only do on- line backups when running in ARCHIVELOG mode. A cold backup is a backup performed while the database is off-line and unavailable to its users.

Description : What is the difference between the SQL*Loader and IMPORT utilities?

Last Answer : These two Oracle utilities are used for loading data into the database. The difference is that the import utility relies on the data being produced by another Oracle utility EXPORT while the SQL* ... from different data sources just so long as it conforms to ASCII formatted or delimited files.

Description : What is the difference between a TEMPORARY tablespace and a PERMANENT tablespace?

Last Answer : A temporary tablespace is used for temporary objects such as sort structures while permanent tablespaces are used to store those objects meant to be used as the true objects of the database.

Description : Explain the difference between a FUNCTION, PROCEDURE and PACKAGE.

Last Answer : A function and procedure are the same in that they are intended to be a collection of PL/SQL code that carries a single task. While a procedure does not have to return any ... functions and procedures that are grouped together based on their commonality to a business function or application.

Description : Explain the difference between $ORACLE_HOME and $ORACLE_BASE.

Last Answer : ORACLE_BASE is the root directory for oracle. ORACLE_HOME located beneath ORACLE_BASE is where the oracle products reside.

Description : Explain the difference between ARCHIVELOG mode and NOARCHIVELOG mode and the benefits and disadvantages to each.

Last Answer : ARCHIVELOG mode is a mode that you can put the database in for creating a backup of all transactions that have occurred in the database so that you can recover to any point in time. ... having to write transactions to an archive log and thus increases the performance of the database slightly.

Description : Explain the difference between a data block, an extent and a segment.

Last Answer : A data block is the smallest unit of logical storage for a database object. As objects grow they take chunks of additional storage that are composed of contiguous data blocks. These groupings ... that an object takes when grouped together are considered the segment of the database object.

Description : Explain the difference between a hot backup and a cold backup and the benefits associated with each.

Last Answer : A hot backup is basically taking a backup of the database while it is still up and running and it must be in archive log mode. A cold backup is taking a backup of the database while it is ... and thus there will be a slight performance gain as the database is not cutting archive logs to disk.

Description : What is the Difference between a post query and a pre query

Last Answer : A post query will fire for every row that is fetched but the pre query will fire only once.

Description : What is the difference between deleting and truncating of tables

Last Answer : Deleting a table will not remove the rows from the table but entry is there in the database dictionary and it can be retrieved But truncating a table deletes it completely and it cannot be retrieved.

Description : What is the difference between candidate key, unique key and primary key

Last Answer : Candidate keys are the columns in the table that could be the primary keys and the primary key is the key that has been selected to identify the rows. Unique key is also useful for identifying the distinct rows in the table.)

Description : What is difference between CHAR and VARCHAR2 ? What is the maximum SIZE allowed for each type ?

Last Answer : CHAR pads blank spaces to the maximum length. VARCHAR2 does not pad blank spaces. For CHAR it is 255 and 2000 for VARCHAR2.

Description : What is difference between TRUNCATE & DELETE ?

Last Answer : 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 triggers fire on DELETE.

Description : What is difference between UNIQUE and PRIMARY KEY constraints?

Last Answer : A table can have only one PRIMARY KEY whereas there can be any number of UNIQUE keys. The columns that compose PK are automatically define NOT NULL, whereas a column that compose a UNIQUE is not automatically defined to be mandatory must also specify the column is NOT NULL.

Description : Difference between database triggers and form triggers?

Last Answer : Data base trigger(DBT) fires when a DML operation is performed on a data base table. Form trigger(FT) Fires when user presses a key or navigates between fields on the screen -Can be row ... other database triggers to fire.Can cause other database triggers to fire, but not other form triggers.

Description : Difference between procedure and function.?

Last Answer : Functions are named PL/SQL blocks that return a value and can be called with arguments procedure a named block that can be called with parameter. A procedure all is a PL/SQL statement by itself, while a Function call is called as part of an expression.

Description : Difference between NO DATA FOUND and %NOTFOUND?

Last Answer : NO DATA FOUND is an exception raised only for the SELECT....INTO statements when the where clause of the querydoes not match any rows. When the where clause of the explicit cursor does not match any rows the %NOTFOUND attribute is set to TRUE instead.

Description : Difference between an implicit & an explicit cursor.?

Last Answer : only one row. However,queries that return more than one row you must declare an explicit cursor or use a cursor FOR loop. Explicit cursor is a cursor in which the cursor name is explicitly ... statements An implicit cursor is used to process INSERT, UPDATE, DELETE and single row SELECT. .INTO

Description : What is difference between Rename and Alias?

Last Answer : Rename is a permanent name given to a table or column whereas Alias is a temporary name given to a table or column which do not exist once the SQL statement is executed.

Description : What is difference between SQL and SQL*PLUS?

Last Answer : SQL*PLUS is a command line tool where as SQL and PL/SQL language interface and reporting tool. Its a command line tool that allows user to type SQL commands to be executed directly against an Oracle ... SQL*PLUS commands are used to format query result, Set options, Edit SQL commands and PL/SQL.

Description : What is difference between a formal and an actual parameter?

Last Answer : The variables declared in the procedure and which are passed, as arguments are called actual, the parameters in the procedure declaration. Actual parameters contain the values that are ... procedure and receive results. Formal parameters are the placeholders for the values of actual parameters

Description : What is difference between Procedures and Functions ?

Last Answer : A Function returns a value to the caller where as a Procedure does not.

Description : What is difference between % ROWTYPE and TYPE RECORD ?

Last Answer : % ROWTYPE is to be used whenever query returns a entire row of a table or view. TYPE rec RECORD is to be used whenever query returns columns of different table or views and variables. E.g. ... emp ename %type ); e_rec emp% ROWTYPE cursor c1 is select empno,deptno from emp; e_rec c1 %ROWTYPE.

Description : What is difference between a Cursor declared in a procedure and Cursor declared in a package specification ?

Last Answer : A cursor declared in a package specification is global and can be accessed by other procedures or procedures in a package. A cursor declared in a procedure is local to the procedure that can not be accessed by other procedures.

Description : What is difference between a PROCEDURE & FUNCTION ?

Last Answer : A FUNCTION is always returns a value using the return statement. A PROCEDURE may return one or more values through parameters or may not return at all.

Description : What is the difference between Fields and FlexFields? (for DBA

Last Answer : A field is a position on a form that one uses to enter, view, update, or delete information. A field prompt describes each field by telling what kind of information appears in ... information about your organization. There are two types of flexfields: key flexfields and descriptive flexfields.

Description : What is the difference between System.current_field and system.cursor_field ?

Last Answer : 1. System.current_field gives name of the field. 2. System.cursor_field gives name of the field with block name.

Description : What is the difference between a Function Key Trigger and Key Function Trigger ?

Last Answer : Function key triggers are associated with individual SQL*FORMS function keys You can attach Key function triggers to 10 keys or key sequences that normally do not perform any SQL * FORMS operations. These keys referred as key F0 through key F9.

Description : What is the difference between an ON-VALIDATE-FIELD trigger and a trigger ?

Last Answer : On-validate-field trigger fires, when the field Validation status New or changed. Post-field-trigger whenever the control leaving form the field, it will fire.

Description : What is the difference between restricted and unrestricted package procedure ?

Last Answer : Restricted package procedure that affects the basic functions of SQL * Forms. It cannot used in all triggers except key triggers. Unrestricted package procedure that does not interfere with the basic functions of SQL * Forms it can be used in any triggers.

Description : What is the difference between ON-VALIDATE-FIELD trigger and a POST-CHANGE trigger ?

Last Answer : When you changes the Existing value to null, the On-validate field trigger will fire post change trigger will not fire. At the time of execute- query post-change trigger will fire, on-validate field trigger will not fire.

Description : What is the difference between locks, latches, enqueues and semaphores? (for DBA

Last Answer : A latch is an internal Oracle mechanism used to protect data structures in the SGA from simultaneous access. Atomic hardware instructions like TEST-AND-SET is used to implement latches. Latches ... see init.ora for each instance) semmni = number of instances running simultaneously; semmsl = semmns

Description : What is the difference between OLE Server & Ole Container?

Last Answer : An Ole server application creates ole Objects that are embedded or linked in ole Containers ex. Ole servers are ms_word & ms_excel. OLE containers provide a place to store, display and manipulate ... are created by ole server applications. Ex. oracle forms is an example of an ole Container.

Description : What is a difference between pre-select and pre-query?

Last Answer : Fires during the execute query and count query processing after oracle forms constructs the select statement to be issued, but before the statement is actually issued. The pre-query trigger fires ... the query criteria in enter query mode.Pre-query trigger fires before pre-select trigger.

Description : What is the difference between object embedding & linking in Oracle forms?

Last Answer : In Oracle forms, Embedded objects become part of the form module, and linked objects are references from a form module to a linked source file.

Description : What are the difference between lov & list item?

Last Answer : Lov is a property where as list item is an item. A list item can have only one column, lov can have one or more columns.

Description : what are difference between post database commit and post-form commit?

Last Answer : Post-form commit fires once during the post and commit transactions process, after the database commit occurs. The post-form-commit trigger fires after inserts, updates and deletes have ... The post-database-commit trigger fires after oracle forms issues the commit to finalized transactions.

Description : What is the difference between SHOW_EDITOR and EDIT_TEXTITEM?

Last Answer : Show editor is the generic built-in which accepts any editor name and takes some input string and returns modified output string. Whereas the edit_textitem built-in needs the input focus to be in the text item before the built-in is executed.

Description : What is difference between open_form and call_form?

Last Answer : when one form invokes another form by executing open_form the first form remains displayed, and operators can navigate between the forms as desired. when one form invokes another form by executing ... are disabled, and operators cannot navigate to them until they first exit the called form.

Description : What is difference between UNIQUE constraint and PRIMARY KEY constraint ?

Last Answer : A column defined as UNIQUE can contain Nulls while a column defined as PRIMARY KEY can't contain Nulls.

Description : What is difference between Multithreaded/Shared Server and Dedicated Server?

Last Answer : Oracle Database creates server processes to handle the requests of user processes connected to an instance. A server process can be either of the following: - A dedicated server process ... you must specifically configure and enable shared server by setting one or more initialization parameters.

Description : What is the difference between Range Partitioning and Hash Partitioning?

Last Answer : Range Partitioning maps data to partitions based on a range of column values (e.g. a date column) Hash Partitioning maps data to partitions based on a hashing algorithm, evenly distributing data between ... . This is typically used where ranges aren't appropriate, i.e. customer number, product ID

Description : What is the difference between Direct Path and Conventional Path loading?

Last Answer : A conventional path load executes SQL INSERT statements to populate tables in an Oracle database. A direct path load eliminates much of the Oracle database overhead by formatting Oracle data blocks and writing the data blocks directly to the database files.

Description : What is the difference between DELETE and TRUNCATE statements?

Last Answer : The DELETE command is used to remove rows from a table. A WHERE clause can be used to only remove some rows. If no WHERE condition is specified, all rows will be removed. After performing a DELETE operation ... be fired. As such, TRUCATE is faster and doesn't use as much undo space as a DELETE.

Description : What is difference between PFile and SPFile?

Last Answer : A PFILE is a static, text file located in $ORACLE_HOME/dbs - UNIX An SPFILE (Server Parameter File) is a persistent server-side binary file that can only be modified with the "ALTER SYSTEM SET" command.