Program to Reverse the given String

PROGRAM FOR REVERSING A GIVEN STRING

SQL>ED REVERSE SQL

DECLARE

L number;

I number;

S varchar2(20);

R varchar2 (20);

BEGIN

           DBMS.output.put_line (‘ENTER STRING’);

           S:= &S;

           L:= length(s);

           FOR I in reverse L..1

          Loop

          R:= r ll sub string (s, I,1);

          END LOOP          

DBMS-output.put_line (“given string;””lls);

Dbms–output.put_line(“reverse string: llr);

END;


OUTPUT:
Enter string  murthy
Given string  murthy
Reverse string   yhtrum

Related

Features of SQL & SQL Plus

SQL:     SQL is, a common language for communicating with oracle server database to access the data. SQL is based on ASCII standards and SQL manipulates data and table definitions ...

RDBMS Keys & Constraints

There are two types of data constraints that can be applied to data inserted into a oracle table. There are I/O constraint [input/output] and business rule constraint. I/O CONSTRAINTS The inpu...

Oracle and its process

INTRODUCTION: Oracle is an RDBMS software provided by oracle development software cor poration .The RDBMS software supports the user declarative statements which describe the rules that the data ...

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item