Protected by Copyscape Web Copyright Protection Software

Pages

Search This Blog

Showing posts with label Display String with in String through SQL. Show all posts
Showing posts with label Display String with in String through SQL. Show all posts

Thursday, March 13, 2014

How to display a column value with in string?


Select name from TAB1;

output:   RAJA
            RAMU
            SIVA
            Sanjay
So my requirement is to display these data in string(With in single Quotes) like below.

            'RAJA'
            'RAMU'
            'SIVA'
            'Sanjay'
Answer
------
SELECT ''''||NAME||'''' FROM TAB1;
outout:  'RAJA'
            'RAMU'
            'SIVA'
            'Sanjay'