SQLServer中字段类型与MySQL中字段类型的对映关系
| My Sql 数据类型 | SQL Server 数据类型 |
|---|---|
| Yes/No | bit |
| Smallint(字节型) | tinyint |
| ** Integer(长整型) /int ** | int |
| Real(单精度浮点型) | real |
| Float(双精度浮点型) | float |
| Currency | money |
| smallmoney | |
| Decimal/numeric | decimal |
| numeric | |
| **Date/Time ** | datetime /datetime2(7) |
| smalldatetime | |
| AutoNumber(增量) | int(带有定义的 Identity 属性) |
| **Text (n) 或 varchar(n) ** | nvarchar(n) |
| Memo | text |
| IMAGE(OLE Object) | 图像 |
| Replication ID(也称作全球唯一标识符 (GUID)) | uniqueidentifier (仅适于 SQL Server 7.0) |
| Hyperlink | ntext(但超级链接没有激活) |
| (无等价的数据类型) | nchar |
| (无等价的数据类型) | varbinary |
| (无等价的数据类型) | 用户定义 |
| (无等价的数据类型) | smallint |
| (无等价的数据类型) | timestamp |
| (无等价的数据类型) | char |
| varchar | nchar |

浙公网安备 33010602011771号