当前位置:网站首页>Detailed explanation of SQL Sever basic data types
Detailed explanation of SQL Sever basic data types
2022-06-24 10:39:00 【Cpsu】
| Classification and data characteristics | data type ( Case insensitive ) |
|---|---|
| Integer data type | BIT 、INT、SAMLLINT、TINYINT |
| Currency data types | MONEY、SMALLMONEY |
| Floating point data types | REAL、FLOAT、DECIMAL、NUMERIC |
| date / Time data type | DATETIME、SMALLDATETIME、DATA、DATETIME(2)、DATETIMESTAMPOFFSET |
| Character data type | CHAR、NCHAR(n)、VARCHAR、NVARCHAR(n) |
| Binary data type | BINARY、VARBINARY |
| Image and text data types | TEXT、NTEXT(n)、IMAGE |
Character data type
char: Fixed length , Storage ANSI character , Fill in the blanks .
nchar(n): Fixed length , Storage Unicode character , Fill in the blanks
varchar: Variable length , Storage ANSI character , Automatically change according to the length of the data .
nvarchar(n): Variable length , Storage Unicode character , Automatically change according to the length of the data .
If you are sure of the length of the stored data , And it doesn't include Chinese , You can choose char type .
If the length of the stored data is certain , But it may include Chinese , You can choose nchar type .
If you are unsure of the length of the stored data , Storage only in English 、 The best use of numbers varchar
If you are unsure of the length of the stored data , There may also be Chinese , You can choose nvarchar type , stay SQL Server2005 Is also a commonly used character data type .
Link to the original text :https://www.cnblogs.com/flyrock/archive/2012/07/08/2581234.html
Floating point data type reference :
https://www.cnblogs.com/Sungeek/p/12167796.html
Currency data type reference :
https://docs.microsoft.com/zh-cn/sql/t-sql/data-types/money-and-smallmoney-transact-sql?view=sql-server-2017
date / Time data type reference :
https://blog.csdn.net/qq_39019865/article/details/81061521
Integer data type reference :
https://www.cnblogs.com/ButterflyEffect/p/8944706.html
Image and text type reference :
https://blog.csdn.net/lishimin1012/article/details/50526988
边栏推荐
- JMeter接口测试工具基础 — Badboy工具
- 机械臂速成小指南(三):机械臂的机械结构
- np. float32()
- 【资源分享】2022年环境工程与生物技术国际会议(CoEEB 2022)
- 【IEEE出版】2022年自然语言处理与信息检索国际会议(ECNLPIR 2022)
- What you must know about distributed systems -cap
- Quick completion guide for mechanical arm (I): development overview of mechanical arm
- 多线程的应用 - 提升效率
- How to customize sharing links in wechat for H5 web pages
- Flink集群搭建以及企业级yarn集群搭建
猜你喜欢

Charles packet capturing tool tutorial

线程池的状态

2022全网最全最细的jmeter接口测试教程以及接口测试流程详解— JMeter测试计划元件(线程<用户>)

The difference between the sleep () method and the wait () method of a thread

24. image mosaic operation

希尔排序图文详解+代码实现

Spark提交参数--files的使用

Hill sorting graphic explanation + code implementation

线程的 sleep() 方法与 wait() 方法的区别

Practice sharing of packet capturing tool Charles
随机推荐
6. package management business development
SF Technology Smart logistics Campus Technology Challenge (June 19, 2022) [AK]
5. dish management business development
Quick completion guide for manipulator (III): mechanical structure of manipulator
3. addition, deletion, modification and query of employees
Cross domain overview, simple accumulation
Appium automation test foundation - mobile end test environment construction (I)
Leetcode-1051: height checker
Resolved: methods with the same name as their class will not be constructors in
26.删除有序数组的重复项
Stack Title: fractions in parentheses
23. opencv - image mosaic project
【资源分享】2022年环境工程与生物技术国际会议(CoEEB 2022)
leetCode-面试题 01.05: 一次编辑
leetCode-929: 独特的电子邮件地址
Flink cluster construction and enterprise level yarn cluster construction
Quick completion guide for mechanical arm (zero): main contents and analysis methods of the guide
包装类型的缓存机制
Thread pool execution process
Uniapp implements the function of clicking to make a call