0% found this document useful (0 votes)
4 views7 pages

SQL_INSTR

The document contains a series of SQL queries using the INSTR function to find the position of specific characters in the strings 'JQSPIDERS' and 'MALAYALAM'. The results show the positions of the characters 'Q' and 'S' in 'JQSPIDERS', and 'A' in 'MALAYALAM', with various parameters for starting positions and occurrences. The output indicates the character positions or zero when the character is not found.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views7 pages

SQL_INSTR

The document contains a series of SQL queries using the INSTR function to find the position of specific characters in the strings 'JQSPIDERS' and 'MALAYALAM'. The results show the positions of the characters 'Q' and 'S' in 'JQSPIDERS', and 'A' in 'MALAYALAM', with various parameters for starting positions and occurrences. The output indicates the character positions or zero when the character is not found.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

SQL> SELECT INSTR('JQSPIDERS','Q',1) FROM DUAL;

INSTR('JQSPIDERS','Q',1)
------------------------
2

SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('JQSPIDERS','Q',2) FROM DUAL


SQL> /

INSTR('JQSPIDERS','Q',2)
------------------------
2

SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('JQSPIDERS','Q',3) FROM DUAL


SQL> /

INSTR('JQSPIDERS','Q',3)
------------------------
0
SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('JQSPIDERS','S',1,1) FROM DUAL


SQL> /

INSTR('JQSPIDERS','S',1,1)
--------------------------
3

SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('JQSPIDERS','S',1,2) FROM DUAL


SQL> /

INSTR('JQSPIDERS','S',1,2)
--------------------------
9

SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('JQSPIDERS','S',2,2) FROM DUAL


SQL> /

INSTR('JQSPIDERS','S',2,2)
--------------------------
9

SQL> -ED
SP2-0042: unknown command "-ED" - rest of line ignored.
SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('JQSPIDERS','S',4,2) FROM DUAL


SQL> /

INSTR('JQSPIDERS','S',4,2)
--------------------------
0

SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('JQSPIDERS','S',4,1) FROM DUAL


SQL> /

INSTR('JQSPIDERS','S',4,1)
--------------------------
9

SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('JQSPIDERS','S',1) FROM DUAL


SQL> /

INSTR('JQSPIDERS','S',1)
------------------------
3

SQL> SELECT INSTR('MALAYALAM','A',1,3) FROM DUAL;

INSTR('MALAYALAM','A',1,3)
--------------------------
6

SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('MALAYALAM','A',1,3) FROM DUAL


SQL> /
INSTR('MALAYALAM','A',1,3)
--------------------------
6

SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('MALAYALAM','A',1,4) FROM DUAL


SQL> /

INSTR('MALAYALAM','A',1,4)
--------------------------
8

SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('MALAYALAM','A',2,4) FROM DUAL


SQL> /

INSTR('MALAYALAM','A',2,4)
--------------------------
8

SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('MALAYALAM','A',2,4) FROM DUAL


SQL> /

INSTR('MALAYALAM','A',2,4)
--------------------------
8

SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('MALAYALAM','A',3,4) FROM DUAL


SQL> /

INSTR('MALAYALAM','A',3,4)
--------------------------
0

SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('MALAYALAM','A',4,2) FROM DUAL


SQL> /
INSTR('MALAYALAM','A',4,2)
--------------------------
6

SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('MALAYALAM','A',4,4) FROM DUAL


SQL> /

INSTR('MALAYALAM','A',4,4)
--------------------------
0

SQL> ED
Wrote file afiedt.buf

1* SELECT INSTR('MALAYALAM','A',4,3) FROM DUAL


SQL> /

INSTR('MALAYALAM','A',4,3)
--------------------------
8

SQL>

You might also like