SQL Server SELECT Literal

SQL Server SELECT Literal


SELECT statement is used to retrive data from database. In thus post we are going to execute our first SELECT statement 'Hello World!!! '.

Before going further we assume you have initial setup for this exercise. If not we recommend to read below post.

  • Install SQL Server
  • Open SQL Server Management Studio.
  • Connect to SQL Server and Open new query window. Execute a test query.
  • Add sample database.

We assume you opened SSMS, and query window is opened. If you want to know how to open SQL Server Management Studio refer this article.

In your opened query window execute below command

SELECT 'Hello World!!! ';


What happened here in this example We use SELECT statement to retrive data from literal. So what is literal? Literals are strings are number.

What we learn from this
SELECT statement is used to retrive data from different database objects such as database table or literals. So if you are thinking SELECT statement is used only to bring data from database than it is wrong.

Below are some more example of SELECT statement with literals.

SELECT 1947;
SELECT 'Hello'+'1';

Now I suggest keep practicing with literals and share your experience with me.

In our next post we are going to use SELECT statement with a database table

Leave A Comment

Please login to post your valuable comments.

Join the newsletter

Get the latest vLemonn news first