SQL Exercises: Display a given string
SQL Basic Select Statement: Exercise-2 with Solution
Write a query to display a string "This is SQL Exercise, Practice and Solution".
Sample Solution:
SELECT "This is SQL Exercise, Practice and Solution";
Output of the Query:
?column? This is SQL Exercise, Practice and Solution
Code Explanation:
The query in SQL that selects a string or a text "This is SQL Exercise, Practice and Solution" as a single column and single row.
Practice Online
Note: You can use literal string (enclosed in single or double quotation mark) just like we use a column name in the SELECT statement. If you use the literal string with a column then it will be displayed in every row of the query results.

Visual presentation:

Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous SQL Exercise: Display all information about all salespeople.
Next SQL Exercise: Display the numbers in columns.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
SQL: Tips of the Day
Is SQL syntax case sensitive?
The SQL Keywords are case-insensitive (SELECT, FROM, WHERE, etc), but are often written in all caps. However in some setups table and column names are case-sensitive. MySQL has a configuration option to enable/disable it. Usually case-sensitive table and column names are the default on Linux MySQL and case-insensitive used to be the default on Windows, but now the installer asked about this during setup. For MSSQL it is a function of the database's collation setting.
Ref: https://bit.ly/3R2iyNZ
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook