T-SQLpowered

SELECT - Basic

Select constant value: SELECT 1 — number SELECT ‘A’ — character SELECT 1, ‘A’ — multiple values Select expression: SELECT 1 + 1 SELECT ‘A’ + ‘A’ SELECT LEFT(‘ABC’, 1) + ‘BC’ Use an asterisk to show all columns: SELECT * FROM sys.tables Select specific columns: SELECT [object_id], [name] FROM…

Read more