type_id(typename)
select tp.name type_name, tp.xusertype, type_id(tp.name) from sys.systypes tp
Index