c#数据类型 与sql的对应关系 以及 取值范围
| Short Name | .NET Class | Type | Width | Range (bits) | SQL Datatype (Closest Match) | Constraint to use (if needed in table definition) |
|---|---|---|---|---|---|---|
|
byte |
Byte |
Unsigned integer |
8 |
0 to 255 |
tinyint | |
|
sbyte |
SByte |
Signed integer |
8 |
-128 to 127 |
smallint | [ColName] Between -128 AND 127 |
|
int |
Int32 |
Signed integer |
32 |
-2,147,483,648 to 2,147,483,647 |
int | |
|
uint |
UInt32 |
Unsigned integer |
32 |
0 to 4294967295 |
bigint | [ColName] Between 0 AND 4294967295 |
|
short |
Int16 |
Signed integer |
16 |
-32,768 to 32,767 |
smallint | |
|
ushort |
UInt16 |
Unsigned integer |
16 |
0 to 65535 |
int | [ColName] Between 0 AND 65535 |
|
long |
Int64 |
Signed integer |
64 |
-922337203685477508 to 922337203685477507 |
bigint | |
|
ulong |
UInt64 |
Unsigned integer |
64 |
0 to 18446744073709551615 |
decimal(20,0) | [ColName] Between 0 AND 18446744073709551615 |
|
float |
Single |
Single-precision floating point type |
32 |
-3.402823e38 to 3.402823e38 |
real | |
|
double |
Double |
Double-precision floating point type |
64 |
-1.79769313486232e308 to 1.79769313486232e308 |
float | |
|
bool |
Boolean |
Logical Boolean type |
8 |
True or false |
bit | |
|
decimal |
Decimal |
Precise fractional or integral type that can represent decimal numbers with 29 significant digits |
128 |
±1.0 × 10e-28 to ±7.9 × 10e28 |
decimal (can go 38 significant in SQL need to limit to 29 for here.) |
c#数据类型 与sql的对应关系 以及 取值范围的更多相关文章
- 关于hibernate对应关系之后取值的问题
hibernate对应关系之后取值,比如一对一关系,取不到值,需要检查PO类中是否生成了getter及setter方法.
- MyBatis SQL配置文件中使用#{}取值为null时却不报错的解决方案。
原因是因为#{kh_id} 这个参数名为小写,我之前写成了大写{#KH_ID}所以取不到值
- sql 对某列取值进行if判断
select if(area_id =350000, 1, 2) as area_id from my_table 取地区编号为350000的设置成 1, 其他的设置成2
- 1.6 SQL (根据时间取值)
select * from 表名 where createdate > date_add(subdate(curdate(),date_format(curdate(),'%w')-1),int ...
- DataList、Repeater、GridView中的Checkbox取值问题
先看页面代码 <asp:DataList id="DataList1" runat="server" Width="100%" Rep ...
- ETHINK组件取值手册
Ethink组件取值手册 一.取值 Sql查询配置中取值方式:所有可以对外过滤的组件都可以用id.output取值 就是取组件setOutput()里输出的值 ,具体分为以下两种: 1)$p{OBJ_ ...
- 关于Thymeleaf无法取值问题
SpringBoot2.7以前的版本在获取model中数据的时候不需要注释,2.7以后的版本需要加注释,它无法直接取存在model中的数据,不加注释的时候会爆红但是可以正常使用,这个注释的含义就是指定 ...
- SQL 用于各种数据库的数据类型(转载) sqlserver 数据类型 取值范围 长度
SQL 用于各种数据库的数据类型 来源 http://www.runoob.com/sql/sql-datatypes.html 面向数据库编程中,数据类型的取值范围.长度,可能是需要经常查看的 ...
- mysql中数据类型的取值范围
mysql整型bigint.int.mediumint.smallint 和 tinyint的语法介绍,如下: 1.bigint 从 -2^63 (-9223372036854775808) 到 2^ ...
随机推荐
- Flash OS images to SD cards & USB drives & TF cards safely and easily using etcher
install tools: wget https://github.com/resin-io/etcher/releases/download/v1.4.5/etcher-cli-1.4.5-lin ...
- AnsiStartsStr 和 空字符串
function AnsiStartsStr(const ASubText, AText: string): Boolean; begin Result := AnsiSameStr(ASubText ...
- selenium(五)伪造浏览器
简介: 这个就比较好玩了,大家还记得以前的QQ小尾巴么?还有百度贴吧的小尾巴,就是那个来自***的iphone7,这个功能. 这个功能是基于浏览器的user-agent功能实现的. 还是httpbin ...
- 数据结构(C语言)关于查找与排序
1)利用readData()函数从data1.txt中读入不同规模的数据存入数组,编写基于数组的顺序查找算法,测试数据量为1万.5万.10万.20万.30万.40万和50万时的数据查询时间. 算法代码 ...
- ansible role[初稿]
ansible roles role_name/ files/:存储由copy或script等模块调用的文件: tasks/:此目录中至少应该有一个名为main.yml的文件,用于定义各task:其它 ...
- beta阶段贡献分配实施
作业要求[https://edu.cnblogs.com/campus/nenu/2018fall/homework/2281] 要求1 每位组员的贡献分值 刘莹莹 王玉潘 潘世维 周昊 赵美增 ...
- linux C 内存分配(~道的光芒四射~)
总结一下C语言中基本的内存分配,加深对内存管理的印象,一步一步走山路~~~~~~~~ 1. 程序和进程 问题:程序和进程各是什么? 程序 只是一段可以执行的代码文件,通俗讲在 linux 上就是一个 ...
- HDU 1590 Searching(求复数向量和的极限)
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission( ...
- magento 如何制作模板
我个人认为Magento模板制作的难点在于不了解Magento的架构,不会调动block.Magento的block调动几乎都是靠xml.在下面的内容会提及如何操作. 制作Magento模板的前提是: ...
- 了解 .NET 的默认 TaskScheduler 和线程池(ThreadPool)设置,避免让 Task.Run 的性能急剧降低
.NET Framework 4.5 开始引入 Task.Run,它可以很方便的帮助我们使用 async / await 语法,同时还使用线程池来帮助我们管理线程.以至于我们编写异步代码可以像编写同步 ...