当前位置:网站首页>Teach you to easily learn the type of data stored in the database (a must see for getting started with the database)
Teach you to easily learn the type of data stored in the database (a must see for getting started with the database)
2022-07-03 22:15:00 【Peach blossom key God】
Database storage data type
Catalog
3 date、time、datetime Date related type
1 numeric Numeric type

-- Create a table ( Field columns use data types )
create table student( id int unsigned auto_increment, name varchar(30),
/* age bigint , You can't write it like that ,bigint It's occupation 8 byte */
age tinyint,
/* Integers can only store integers 18*/
money decimal(10,2),
/* 99999999.99 Maximum number If there is no number, it is 0.00 */
primary key(id) );
-- insert data
insert into student values(null,'jack',18,200);
-- Query data
select * from student;
-- unsigned demonstration
-- age int
-- age int unsigned Unsigned , No negative number , from 0 Start Fast
-- zerofill 0 fill
-- age int(3) zerofill , If you insert a number 1 When querying 001
-- 3 On behalf of the digital 3 Bit width , No 3 digit , If not three , Then fill in the front 0
create table t1( name varchar(30),n1 int, n2 int unsigned, n3 int(3),
/* here 3 No meaning, no effect */
n4 int(5) zerofill);
/* If the content is not enough 5 position , Then fill 0 */
insert into t1 values('jack',1,2,3,4);
select * from t1;
-- jack 1 2 3 00004
insert into t1 values('lisi',-1,0,-3,2342342);2 string character string


3 date、time、datetime Date related type


4 enum set The compound type

5 bit Boolean
6 json

7 binary Binary system

边栏推荐
- Conditional statements of shell programming
- Minio deployment
- LeetCode 1647. Minimum deletion times of unique character frequency
- Data consistency between redis and database
- Teach you how to install aidlux (1 installation)
- Redis concludes that the second pipeline publishes / subscribes to bloom filter redis as a database and caches RDB AOF redis configuration files
- What is the difference between res.send() and res.end() in the node express framework
- Décompiler et modifier un exe ou une DLL non source en utilisant dnspy
- gslb(global server load balance)技術的一點理解
- 2022 safety officer-a certificate registration examination and summary of safety officer-a certificate examination
猜你喜欢

320. Energy Necklace (ring, interval DP)

2022 G3 boiler water treatment registration examination and G3 boiler water treatment examination papers

Dahua series books

Collection | pytoch common loss function disassembly

Mysql database - Advanced SQL statement (I)
![[SRS] build a specified version of SRS](/img/01/0d2d762e01b304220b8924d20277e3.jpg)
[SRS] build a specified version of SRS

Correlation

treevalue——Master Nested Data Like Tensor

Exclusive interview with the person in charge of openkruise: to what extent has cloud native application automation developed now?

Decompile and modify the non source exe or DLL with dnspy
随机推荐
DR882-Qualcomm-Atheros-QCA9882-2T2R-MIMO-802.11ac-Mini-PCIe-Wi-Fi-Module-5G-high-power
string
Covariance
Décompiler et modifier un exe ou une DLL non source en utilisant dnspy
WiFi 2.4g/5g/6g channel distribution
Buuctf, web:[geek challenge 2019] buyflag
Asynchronous artifact: implementation principle and usage scenario of completable future
Control loop of program (while loop)
Cognitive fallacy: what is dimensional curse
Report on the development status and investment planning trends of China's data center industry Ⓡ 2022 ~ 2028
1068. Consolidation of ring stones (ring, interval DP)
China's TPMS industry demand forecast and future development trend analysis report Ⓐ 2022 ~ 2028
Farmersworld farmers world, no faith, how to talk about success?
[actual combat record] record the whole process of the server being attacked (redis vulnerability)
[SRS] build a specified version of SRS
The White House held an open source security summit, attended by many technology giants
Exclusive interview with the person in charge of openkruise: to what extent has cloud native application automation developed now?
STM32 multi serial port implementation of printf -- Based on cubemx
常用sql集合
十大券商开户注册安全靠谱吗?有没有风险的?
