Microsoft SQL Server 中是否有像 MySQL 中那样的布尔数据类型? [英] Is there a Boolean data type in Microsoft SQL Server like there is in MySQL?

查看:23
本文介绍了Microsoft SQL Server 中是否有像 MySQL 中那样的布尔数据类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Microsoft SQL Server 中是否有像 MySQL 中那样的布尔数据类型?

Is there a Boolean data type in Microsoft SQL Server like there is in MySQL?

如果不是,MS SQL Server 中的替代方案是什么?

If not, what is the alternative in MS SQL Server?

推荐答案

您可以使用 BIT 数据类型来表示布尔数据.BIT 字段的值为 1、0 或 null.

You could use the BIT datatype to represent boolean data. A BIT field's value is either 1, 0, or null.

这篇关于Microsoft SQL Server 中是否有像 MySQL 中那样的布尔数据类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆