A CAST
should work fine with a nullable column. It will just return NULL
. If you do not want NULL
then you can use ISNULL
.
SELECT ISNULL(CAST(NULL AS VARCHAR(20)), '') 'A not yet defined column'
You should be careful with changing the data types though. If you use smaller data types you could either lose data or get an error.