Q1:什么是顯式轉換函數和隱式轉換函數
A1:顯示轉換,就是你使用轉換函數進行操作。
隱式轉換,就是你不使用轉換函數,默認就給轉換了。比如定義一個int型的變量@a,然后給變量符值 set @a = '2' ,這個就會隱式轉換,把字符轉換成數字了。
出處:https://zhidao.baidu.com/question/747550303890686332.html
Q2:sql server 的顯式轉換
A2:主要為兩個函數實現:cast和convert
格式:
-- CAST Syntax:
CAST ( expression AS data_type [ ( length ) ] )
-- CONVERT Syntax:
CONVERT ( data_type [ ( length ) ] , expression [ , style ] )
出處:https://docs.microsoft.com/zh-cn/sql/t-sql/functions/cast-and-convert-transact-sql?view=sql-server-2017#BKMK_examples
Q3 怎樣改變列的數據類型
https://www.cnblogs.com/pangpanghuan/p/6432331.html
