SQL – Hello World

In a time-honoured tradition in every programming language the first thing they teach you is how to get the system to put ‘Hello World’ on to your screen.

This is accomplished by using the below command.

PRINT ‘HELLO WORLD’

1

Play about with the PRINT command and see what else you can get the system to reproduce.

SELECT – The basis of the SQL language

The SELECT query is the basis of SQL and is the most commonly used syntax within SQL.

SELECT basically means retrieve.

For example the query SELECT 1 returns 1.

1

SELECT ‘This is an example of the SELECT statement’

2

As you can see the SELECT query is simply retrieving the number or word and returning that as a result.

If you want information from a database within a table then you must select a database and table.

3