SQL Server的tinyint有个坑啊

      根据微软官方文档 http://technet.microsoft.com/zh-cn/library/ms187745.aspx,SQL Server支持bignt, int, smallint, tinyint这四种int,前三种都是有符号的,而tinyint却是无符号的,取值范围是0-255,而Mysql里面,tinyint默认是有符号的,取值范围是-128到127,unsigned tinyint才是0-255,如果在这两个数据库直接迁移表结构的话,就要注意了。

猜你喜欢

转载自swordinhand.iteye.com/blog/2005584
今日推荐