Basic Oracle Concepts and Programming Question:

How To Write Text Literals in Oracle?

Oracle Database Interview Question
Oracle Database Interview Question

Answer:

There are several ways to write text literals as shown in the following samples:

SELECT 'globalguideline.com' FROM DUAL -- The most common format
globalguideline.com

SELECT 'It''s Sunday!' FROM DUAL -- Single quote escaped
It's Sunday!

SELECT N'Allo, C''est moi.' FROM DUAL -- National chars
Allo, C'est moi.

SELECT Q'/It's Sunday!/' FROM DUAL -- Your own delimiter
It's Sunday!



Previous QuestionNext Question
What Are the ANSI Data Types Supported in Oracle?How To Write Numeric Literals in Oracle?