🎴 Flashcard Mode
Database Fundamentals: Data Types, Cursors & Storage
Card1 / 20
Mastered0
Review0
QuestionClick to flip
Which of the query will print the output as 'TCS' (single quotes should come in the output)
AnswerClick to flip back
A
select ' ' 'TCS' ' ' from dual
💡 Explanation:
In Oracle SQL, to include a single quote in a string literal, you escape it by doubling it. The string ' ' 'TCS' ' ' actually parses as: quote-space-quote (space), then 'TCS', then quote-space-quote (space). The doubled quotes represent literal single quote characters. Option B correctly uses this escaping.