当前位置:网站首页>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 . | |
边栏推荐
- 复现php一句话木马
- 雨课堂 《知识产权法》笔记
- Leetcode-209. subarray with the smallest length (binary, prefix and, sliding window)
- ESP8266-Arduino编程实例-开发环境搭建(基于PlatformIO)
- Common library installation
- 新来个技术总监要我做一个 IP 属地功能~
- win10 1903 笔记本开热点出现蓝屏问题
- [reprint] the multivariate normal distribution
- 【转载】多元高斯分布(The Multivariate normal distribution)
- On vio's IMU pre integration (the idea when I first started)
猜你喜欢
随机推荐
easyui04
Generation and transformation of pulse waveform
Rigorous proof of Behrman's expectation equation
easyui05
Access rights - private, public, protected
The combination of pytest confitest.py and fixture
X 2 Earn必须依靠旁氏启动?Gamefi的出路在哪?(上)
新来个技术总监要我做一个 IP 属地功能~
DP的基本递归方程
PostgreSQL在Linux和Windows安装和入门基础教程
Caused by: scala.MatchError: None (of class scala.None$)
HCI interface
Notes on intellectual property law in Yu classroom
Understanding of Abstract Programming
QT——LCDNumber
Harbor2.2 用户角色权限速查
Synchronized and reentrantlock
An error occurred in the scrapy shell
Postman export import
找工作4个月,面试15家,终于拿到3个offer,定级P7+
~
~ 






![[development tool] ieda red](/img/2d/eec1f74c33ff21ae4951eae44b9369.png)

