当前位置:网站首页>MySQL修改字段语句
MySQL修改字段语句
2022-06-25 15:32:00 【號先生】
新增字段格式:
ALTER TABLE 表名 ADD 字段名称 字段类型(字段长短-选填) CHARACTER SET utf8mb4 COLLATE
utf8mb4_general_ci NOT NULL(是否不可为空) DEFAULT 0(默认值) COMMENT '备注' ;
eg:
ALTER TABLE table_name ADD COLUMN age varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 0 COMMENT '年龄' ;
mysql 根据逗号对字段分割计算字段的长度:
EXPLAIN UPDATE ncs_fx_frandcategory
SET WEIGHT = 30
WHERE
id IN (
SELECT
id
FROM
(
SELECT
id
FROM
ncs_fx_frandcategory
WHERE
TOPIC_CLASS LIKE '1%'
AND ( LENGTH( WORD ) - LENGTH( REPLACE ( WORD, ',', '' )) + 1 ) <= 1
) AS t1
)
边栏推荐
- Boost listening port server
- A deformation problem of Hanoi Tower
- [paper notes] poly yolo: higher speed, more precise detection and instance segmentation for yolov3
- Js- get the mouse coordinates and follow them
- 在国信金太阳开股票账户安全吗?
- Markdown learning
- Pytorch distributed test pit summary
- Yolov5 Lite: fewer parameters, higher accuracy and faster detection speed
- Is it safe to open a stock account online?
- 3. Sequential structure multiple choice questions
猜你喜欢

MySQL field truncation principle and source code analysis

Js- get the mouse coordinates and follow them
![[C language] implementation of magic square array (the most complete)](/img/b2/2595263b77e0abac667972bbfe0c8a.jpg)
[C language] implementation of magic square array (the most complete)

Solution of push code failure in idea

Why do I need message idempotence?

JSON module dictionary and string conversion

5 connection modes of QT signal slot

Esp8266 building smart home system

Day01: learning notes

Advertising effect cluster analysis (kmeans)
随机推荐
Distributed token
Shared memory synchronous encapsulation
Yolov4 coco pre train Darknet weight file
Statistical analysis - data level description of descriptive statistics
Image segmentation based on deep learning: network structure design
Is it safe to open a stock account through the account opening link given by the account manager? I want to open an account
The robot is playing an old DOS based game
If a thread overflows heap memory or stack memory, will other threads continue to work
Simulating Sir disease transmission model with netlogo
Solution of push code failure in idea
JVM memory region details
Leetcode123 timing of buying and selling stocks III
Solve the go project compilation error go mod: no such file or directory
Architecture evolution of high-performance servers -- Suggestions
(2) Relational database
CV pre training model set
Principle and implementation of MySQL master-slave replication (docker Implementation)
客户经理给的开户链接办理股票开户安全吗?我想开个户
Install Kali extension 1: (kali resolution problem)
Detailed summary of reasons why alertmanager fails to send alarm messages at specified intervals / irregularly