当前位置:网站首页>Data type of SQL Server database
Data type of SQL Server database
2022-07-26 11:31:00 【Baby paper d】
There are three types of databases : Digital data types 、 Character data type 、 Date and time data types .
One 、 Digital
I record several commonly used , Incomplete
| Integer types | bigint | - ~ -1 |
| int | - ~ -1 | |
| bit | 1 or 0 | |
| Decimal type | decimal | These two usages are the same , Almost no difference ,numeric(52,1) This means that the total length is 52, The decimal places are 1 position . You can also leave it blank , Or just add a number to indicate the total length ( No decimal places ) |
| numeric | ||
| float | The most commonly used is still float | |
| Type of currency | money | Ten thousandths of the unit of currency , However, it is generally used directly float That's OK |
Two 、 Character data type
| Single byte (8000) | varchar() | Lengthening , The maximum number of bytes that can be stored | At the expense of performance ( Judge every time ), Save space | Commonly used varchar() type |
| char() | Fixed length , The storage space is allocated directly | Wasted space , Improved performance | ||
| Double byte (4000) | nvarchar() | Lengthening | Commonly used nvarchar() type | |
| nchar() | Fixed length | |||
| A letter takes up a byte , A Chinese character takes up two bytes | ||||
3、 ... and 、 Date and time data types
| datetime | Accurate to milliseconds |
| smalldatetime | To the minute |
| Generally, the date can also be in character type varchar() To represent the . | |
边栏推荐
- 记录个人遇到的错误
- Rigorous proof of Behrman's expectation equation
- 数据可视化-《白蛇2:青蛇劫起》(2)
- easyui01
- 程序员成长第二十八篇:管理者如何才能不亲力亲为?
- 剑指 Offer 25. 合并两个排序的链表
- MySql基础知识汇总
- [error reporting] what do you read in the log
- Getting started step by step using g2o to solve ICP problems - estimating the transformation relationship between two sets of 3D point sets with matching relationship
- The company cannot access station B
猜你喜欢
随机推荐
由浅入深搭建神经网络
常用库安装
PyQt5快速开发与实战 3.1 Qt Designer快速入门
Mysql database advanced
MySQL basic knowledge summary
3dunity game project practice - first person shooting game
Cmake常用命令总结
记录个人遇到的错误
【万字长文】使用 LSM-Tree 思想基于.Net 6.0 C# 实现 KV 数据库(案例版)
MySQL锁机制
easyui01
MLX90640 红外热成像仪测温传感器模块开发笔记(六)
MySql基础知识汇总
找工作4个月,面试15家,终于拿到3个offer,定级P7+
【转载】多元高斯分布(The Multivariate normal distribution)
承认吧 投新能源就是为了安全感
加载ORB词典
QT——LCDNumber
easyui03
数据中台建设(二):数据中台简单介绍
~
~ 







![[idea]如何新建一个项目](/img/33/f210d59ccd3664487f401929dac24c.png)