当前位置:网站首页>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
)
边栏推荐
- How to deal with mining process
- Image segmentation based on deep learning: network structure design
- QT excel table read / write library - qtxlsx
- [C language] implementation of magic square array (the most complete)
- Kali modify IP address
- Record the time to read the file (the system cannot find the specified path)
- Errno perrno and strerrno
- 剑指 Offer II 091. 粉刷房子
- 剑指 Offer 05. 替换空格
- Shared memory synchronous encapsulation
猜你喜欢

剑指 Offer 06. 从尾到头打印链表

Shared memory synchronous encapsulation

Kali modify IP address

Advertising effect cluster analysis (kmeans)

System Verilog - thread
![[paper notes] overview of case segmentation](/img/93/57ad42e0c058b7d5fd1b4066678707.jpg)
[paper notes] overview of case segmentation

Dynamic memory allocation

Data feature analysis skills - correlation test

Ubuntu 20.04 installing mysql8.0 and modifying the MySQL password

JSON module dictionary and string conversion
随机推荐
JS capture, target, bubble phase
在打新债开户证券安全吗,需要什么准备
3. Sequential structure multiple choice questions
Leetcode123 timing of buying and selling stocks III
剑指 Offer 05. 替换空格
Summary of four parameter adjustment methods for machine learning
Data preprocessing - normalization and standardization
Introduction to flexible array
2. operator and expression multiple choice questions
Is it safe to open an account for new bonds? What preparations are needed
Generic - learning notes
Qcodeeditor - QT based code editor
Js- get the mouse coordinates and follow them
Cross compilation correlation of curl Library
Source code analysis of synergetics and ntyco
双目3D感知(一):双目初步认识
[paper notes] street view change detection with deconvolutional networks
Getting started with lambda8 new features
Using reentrantlock and synchronized to implement blocking queue
Distributed token