T-SQL Tutorial

Real - TSQL Tutorial


On Transact SQL language the real is an numeric data type and defines approximate numeric values with 4 bytes storage.

Real syntax:

real

Real example:

USE model;
GO
DECLARE @myVar1 real;
DECLARE @myVar2 real;
DECLARE @myVar3 real;
SET @myVar1 = 718;
SET @myVar2 = 718.5;
SET @myVar3 = -718.7;
PRINT @myVar1;
PRINT @myVar2;
PRINT @myVar3;
GO

Results
718
718.5
-718.7