9.5.4 Microsoft SQL Server Type Mapping

Table 9.2 Type mapping

Source TypeMySQL TypeComment
INTINT 
TINYINTTINYINTUNSIGNED flag set in MySQL
SMALLINTSMALLINT 
BIGINTBIGINT 
BITTINYINT(1) 
FLOATFLOATPrecision value is used for storage size in both
REALFLOAT 
NUMERICDECIMAL 
DECIMALDECIMAL 
MONEYDECIMAL 
SMALLMONEYDECIMAL 
CHARCHAR/LONGTEXTDepending on its length. MySQL Server 5.5 and above can have CHAR columns with a length up to 255 characters. Anything larger is migrated as LONGTEXT
NCHARCHAR/LONGTEXTDepending on its length. MySQL Server 5.5 and above can have VARCHAR columns with a length up to 65535 characters. Anything larger is migrated to one of the TEXT blob types. In MySQL, character set of strings depend on the column character set instead of the datatype.
VARCHARVARCHAR/MEDIUMTEXT/LONGTEXTDepending on its length. MySQL Server 5.5 and above can have VARCHAR columns with a length up to 65535 characters. Anything larger is migrated to one of the TEXT blob types.
NVARCHARVARCHAR/MEDIUMTEXT/LONGTEXTDepending on its length. MySQL Server 5.5 and above can have VARCHAR columns with a length up to 65535 characters. Anything larger is migrated to one of the TEXT blob types. In MySQL, character set of strings depend on the column character set instead of the datatype.
DATEDATE 
DATETIMEDATETIME 
DATETIME2DATETIMEDate range in MySQL is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'. Note: fractional second values are only stored as of MySQL Server 5.6.4
SMALLDATETIMEDATETIME 
DATETIMEOFFSETDATETIME 
TIMETIME 
TIMESTAMPTIMESTAMP 
ROWVERSIONTIMESTAMP 
BINARYBINARY/MEDIUMBLOB/LONGBLOBDepending on its length
VARBINARYVARBINARY/MEDIUMBLOB/LONGBLOBDepending on its length
TEXTVARCHAR/MEDIUMTEXT/LONGTEXTDepending on its length
NTEXTVARCHAR/MEDIUMTEXT/LONGTEXTDepending on its length
IMAGETINYBLOB/MEDIUMBLOB/LONGBLOBDepending on its length
SQL_VARIANTnot migratedThere is not specific support for this datatype.
TABLEnot migratedThere is not specific support for this datatype.
HIERARCHYIDnot migratedThere is not specific support for this datatype.
UNIQUEIDENTIFIERVARCHAR(64)A unique flag set in MySQL. There is not specific support for inserting unique identifier values.
SYSNAMEVARCHAR(160) 
XMLTEXT