当前位置:网站首页>MySQL修改字段語句
MySQL修改字段語句
2022-06-25 15:35: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
)
边栏推荐
- 2. operator and expression multiple choice questions
- JVM memory region details
- Errno perrno and strerrno
- Breakpad usage and DMP analysis
- MySQL transaction characteristics and implementation principle
- [paper notes] mcunetv2: memory efficient patch based influence for tiny deep learning
- Weka download and installation
- Learning notes on February 5, 2022 (C language)
- MySQL performance optimization - index optimization
- Yolov5 Lite: fewer parameters, higher accuracy and faster detection speed
猜你喜欢

Learning notes on February 8, 2022 (C language)

Distributed transaction solution

剑指 Offer 05. 替换空格

(1) Introduction

Yolov5 Lite: fewer parameters, higher accuracy and faster detection speed

Data feature analysis skills - correlation test

Solution of push code failure in idea

If a thread overflows heap memory or stack memory, will other threads continue to work

剑指 Offer 03. 数组中重复的数字

Brief introduction to class loading process
随机推荐
Graphic control and layout basis of R visualization
Qcodeeditor - QT based code editor
Breakpad usage and DMP analysis
How to package rpm
剑指 Offer 04. 二维数组中的查找
Using reentrantlock and synchronized to implement blocking queue
到底要不要去外包公司?这篇带你全面了解外包那些坑!
Error com mysql. cj. jdbc. exceptions. Communicationsexception: solutions to communications link failure
GDB debugging
Kali SSH Remote Login
Shared memory synchronous encapsulation
What is the safest app for stock account opening? Tell me what you know
One code per day - day one
Could not connect to redis at 127.0.0.1:6379 in Windows
Pytorch distributed test pit summary
Leetcode121 timing of buying and selling stocks
Learning notes on February 8, 2022 (C language)
About?: Notes for
55 specific ways to improve program design (1)
QT article outline