当前位置:网站首页>SQL data type
SQL data type
2022-04-21 18:41:00 【Game programming】
SQL A data type is an attribute , It specifies anything SQL The type of data in the object . stay SQL in , Any column 、 Variables or expressions have their data types .
When creating a table , You will use these data types . You should choose the appropriate data type for each column in the table as needed .
SQL Server Six data types are provided for you to use :
Exact numeric data type
| data type | Lower limit | ceiling |
| bigint | -9,223,372,036,854,770,000 | 9,223,372,036,854,770,000 |
| int | -2,147,483,648 | 2,147,483,647 |
| smallint | -32,768 | 32,767 |
| tinyint | 0 | 255 |
| bit | 0 | 1 |
| decimal | 1E+38 | 10^38 -1 |
| numeric | 1E+38 | 10^38 -1 |
| money | -922,337,203,685,477.00 | 922,337,203,685,477.00 |
| smallmoney | -214,748.36 | 214,748.36 |
Approximate numerical data type
| data type | Lower limit | ceiling |
| float | -1.79E + 308 | 1.79E + 308 |
| real | -3.40E + 38 | 3.40E + 38 |
Date and time data types
| data type | Lower limit | ceiling |
| datetime | Jan 1, 1753 | 31-Dec-99 |
| smalldatetime | 1-Jan-00 | 6-Jun-79 |
| date | Store a date data , for example June 30, 1991 | |
| time | Store a time data , for example 12:30 P.M. |
Be careful : datetime The time and accuracy are 3.33 ms, and smalldatetime The time accuracy of is 1 min.
String data type
| data type | Lower limit | ceiling |
| char | char | Maximum length is 8,000 character .( Fixed length is not Unicode character ) |
| varchar | varchar | Maximum length is 8,000 character .( Lengthening is not Unicode data ) |
| varchar(max) | varchar(max) | Maximum length is 231 character , Lengthening is not Unicode data ( Limited to SQL Server 2005). |
| text | text | Lengthening is not Unicode Character data , Maximum length 2,147,483,647 character . |
Unicode String data type
| data type | describe |
| nchar | Maximum length 4000 character .( Fixed length Unicode character string ) |
| nvarchar | Maximum length 4000 character .( Lengthening Unicode character string ) |
| nvarchar(max) | Maximum length 231 character .( Limited to SQL Server 2005).( Lengthening Unicode character string ) |
| ntext | Maximum length 1,073,741,823 character .( Lengthening Unicode character string ) |
Binary data type
| data type | describe |
| binary | Maximum length 8000 byte .( Fixed length binary data ) |
| varbinary | Maximum length 8000 byte .( Variable length binary data ) |
| varbinary(max) | Maximum length 231 byte ( Limited to SQLServer 2005). ( Variable length binary data ) |
| image | Maximum length 2,147,483,647 byte .( Variable length binary data ) |
Other data types
| data type | describe |
| sql_variant | Store a variety of SQL Supported data types ,text、ntext、timestamp With the exception of . |
| timestamp | A unique value at the database level , This data is updated whenever a row is updated . |
| uniqueidentifier | Globally unique identifier (GUID) |
| xml | Storage XML data . You can store... In columns or variables XML example .( Limited to SQL Server 2005) |
| cursor | Point to cursor object . |
| table | Store results , For later use . |
author : I just learned programming
Game programming ️, A game development favorite ~
If the picture is not displayed for a long time , Please use Chrome Kernel browser .
版权声明
本文为[Game programming]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211837229528.html
边栏推荐
- Singleton mode you have to know the underlying principle
- Target penetration exercise 75-dc7
- 【小程序】支付宝小程序自定义下拉刷新组件
- Where is the initial password for MySQL installation?
- Is the securities account of qiniu app safe? Who's driving here?
- SQL 数据类型
- How to view the zskiplist structure in redis source code
- Frida hook variable parameters
- 2021-5-2 question 2 on the second day
- 腾讯云数据库TDSQL——博客数据库迁移实践
猜你喜欢

CVPR2022 Oral | 多模态学习中的贡献不平衡问题
总结了30个例子之后,我悟到了Flutter的布局原理

AVL树删除,详细图解

Teach you how to build components and applications by hand

Target penetration exercise 73-dc5

初始redis基础了解

数字IC教程之 02 Quartus Prime 和 Modelsim 安装教程

Huawei, TCL, Dajiang

Advanced formula 48 of C language: principle of function design

不能再简单的意向锁
随机推荐
Does qiniu business school need money to open a securities account? Is it safe?
年末我的Android面试复盘
Goldfish rhca memoirs: rh358 managing DNS and DNS servers -- overview of DNS services
MySQL安装的初始密码在哪看?
天创速盈简述静态创意是怎么收费的呢?
Question 3 on the third day of May 3, 2021
每日一博 - Devops全流程
|NO.Z.00063|——————————|BigDataEnd|
C language operator summary
CDF global survey: stagnant software delivery performance
Teach you how to build components and applications by hand
Kotlin | 关于 Lazy ,你应该了解的这些事
使用chrome的replay功能快速地发表一遍blog
How to parameterize use cases for dry goods app automation
2021-5-2 第二天第二题
启牛证券账户app怎么样?谁开户了?安全吗?
Lovely Tommy C language
【GAMES101】作业5 简单光线追踪与框架理解
Daily blog - Devops whole process
ArrayList && { }