惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
罗磊的独立博客
H
Help Net Security
L
LangChain Blog
T
Threat Research - Cisco Blogs
量子位
S
Securelist
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
T
Threatpost
Security Latest
Security Latest
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
F
Full Disclosure
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Heimdal Security Blog
J
Java Code Geeks
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
B
Blog RSS Feed
月光博客
月光博客
C
Cisco Blogs
V
Visual Studio Blog
D
DataBreaches.Net
H
Hacker News: Front Page
博客园 - 叶小钗
N
News and Events Feed by Topic
爱范儿
爱范儿
A
Arctic Wolf

博客园 - nestea

Method 'Post' of object 'IOWSPostData' failed(方法'POST'作用于对象'IOWSPostData'时失败) 用Win XP安装盘修复系统文件 手机呼叫流程 XML配置字符串中特殊字符的处理 - nestea - 博客园 关于BackgroundWorker的使用 分布式缓存系统Memcached简介与实践[转] web应用程序中使用MemcachedClient (转载) 一些很酷的.Net技巧(转载) 使用BackgroundWorker组件进行异步操作编程(转载) 操作DataTable中动态的行,一点收集整理资料。 xml转换成DataTable - nestea - 博客园 预处理命令之条件编译(转) 数字的进制(2进制,8进制,16进制) C#中父窗口和子窗口之间实现控件互操作 (转载) 开放式并发冲突检测的四种方法 MDX 中的重要概念 (MDX) 实用工具-文件夹实时同步工具 (群集服务器拷贝) 用windows 2003建立VPN 连接(转载) - nestea Windows 2003下VPN服务器架设攻略 (转载) - nestea
sql server中的decimal或者numeric的精度问题 (转载)
nestea · 2009-07-07 · via 博客园 - nestea

在sql server中定义列的数据类型decimal时需要制定其精度和小数位数。

何谓精度:最多可以存储的十进制数字的总位数,包括小数点左边和右边的位数。该精度必须是从 1 到最大精度 38 之间的值。默认精度为 18。

小数位数:小数点右边可以存储的十进制数字的最大位数。小数位数必须是从 0 到 p 之间的值。仅在指定精度后才可以指定小数位数。默认的小数位数为 0;因此,0 <= s <= p。最大存储大小基于精度而变化。

在c sharp中调用传递SqlParameter参数时也需要制定参数的精度和小数的位数,如下面的例子声明一个精度为18小树位数为2的decimal类型参数:

Code
SqlParameter parm = new SqlParameter("@parmName", SqlDbType.Decimal);
parm.Precision = 18;
parm.Scale = 2;

转:链接 玉开的技术博客