>Consider the following SELECT statement:
>
>SELECT Id,
> 0 AS MyNumber
>FROM MyTable
>
>
>How can I make sure the MyNumber field is a specific type, e.g., tinyint or int?
>
>
>Thanks,
>Einar
SELECT Id,
CAST(0 as int) AS MyNumber
FROM MyTable
or
SELECT Id,
CAST(0 as tinyint) AS MyNumber
FROM MyTable
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.