Hello, SELECT

What you’ll learn

  • Selecting constants and basic SELECT shape.
  • Comment styles: -- (single line), /* ... */ (block).
-- Selecting constants
SELECT 1 AS One, N'Hello' AS Greeting;

/* Selecting from a system view */
SELECT TOP (3) name, object_id
FROM sys.objects
ORDER BY name;