当前位置:网站首页>Mining pit record of modified field information in Dameng database
Mining pit record of modified field information in Dameng database
2022-06-26 00:42:00 【White as dust】
List of articles
1. summary
- Purpose : Modify all tables in the tablespace xxx Length of field .
- Realization : adopt SQL Make changes .
- problem : The navigation bar — Pattern — Table space — surface — Right click to view the table information , The field length has not been modified to .
- Tools :DM Management tools ( Dameng's own database management tool ).
2. The process
2.1 Problems arise
-- adopt SQL Find out xx A table whose field length meets the requirements , Concatenate the modified field length SQL
SELECT 'ALTER TABLE ' || t.table_name || ' MODIFY xxx VARCHAR(1);' AS str
FROM user_tab_columns t
WHERE t.column_name='xxx' AND t.data_length > 1;
-- Perform the spliced SQL, View table properties , The field length has not changed .
2.2 Refresh 、 Transaction commit attempt
Refresh table 、 Table space 、 Pattern 、 The connection has no effect . Looks like a big move , Restart the tool ; Close tooltip transaction not committed , That's the reason . perform COMMIT, Not yet. ( Later, we found that this transaction is a query statement (╯︵╰)).
2.3 Check SQL
SQL I didn't write it right , Fall into self doubt ( I'm using Oracle Of SQL sentence ). We can only see what the official documents of Damon say .
-- In document SQL Example :
ALTER TABLE PRODUCTION.PRODUCT_REVIEW MODIFY NAME VARCHAR(8) ;
sql No problem .
2.4 Verify that the table information of the navigation bar is not updated
- Through the initial query SQL, It is found that there is no data whose field length does not meet the requirements .
- adopt idea Of database Connect to database , It is found that the field length has been modified to .
3. summary
Daydream “DM Management tools ” A pit .
Directly modify the field length in the table attribute to ; use SQL modify , The navigation bar cannot be modified , But in fact, the modification was successful .
SQL How to update after modification , There is no way to refresh .
4. Problem solving
SQL There is no schema to get the table name in ( Schema name .table_name) Why , Only when the schema name is written will the field information in the navigation bar table attribute be updated ( Although the schema name in the document is optional , It's ok if you don't write ).
边栏推荐
- Use js to obtain the last quarter based on the current quarter
- Redux workflow explanation + small examples
- Comprehensive introduction to Simulink solver
- The problem of low video memory in yolov5 accelerated multi GPU training
- "Method not allowed", 405 problem analysis and solution
- Darkent2ncnn error
- 19c安装psu 19.12
- Xiaohongshu microservice framework and governance and other cloud native business architecture evolution cases
- Ssl/tls, symmetric and asymmetric encryption, and tlsv1.3
- Ffmpeg version switching
猜你喜欢

1-9network configuration in VMWare

把控元宇宙产业的发展脉络

86. (cesium chapter) cesium overlay surface receiving shadow effect (gltf model)

学习识别对话式问答中的后续问题

Introduction to anchor free decision

11.1.1 overview of Flink_ Flink overview

Flink reports error: a JNI error has occurred, please check your installation and try again

Is camkiia the same as gcamp6f?
![[advanced ROS] Lecture 1 Introduction to common APIs](/img/25/85e8c55605f5cc999a8e85f0a05f93.jpg)
[advanced ROS] Lecture 1 Introduction to common APIs

When installing PSU /usr/bin/ld:warning: -z lazload ignore
随机推荐
Comprehensive introduction to Simulink solver
CaMKIIa和GCaMP6f是一样的嘛?
使用VS2022编译Telegram桌面端(tdesktop)
性能领跑云原生数据库市场!英特尔携腾讯共建云上技术生态
19c安装psu 19.12
Redux workflow + complete code of small examples
Simulink求解器综合介绍
渲云携手英特尔,共创云渲染“芯”时代
Causes and solutions to the phenomenon of PCBA monument in SMT patch processing
Law and self-regulation in the meta universe
1-10Vmware构建自定义的网络架构
Types of feeder and how to work
使用VS2022編譯Telegram桌面端(tdesktop)
快手实时数仓保障体系研发实践
1-11solutions to common problems of VMware virtual machine
ffmpeg 版本切换
[image detection] vascular tracking and diameter estimation based on Gaussian process and Radon transform with matlab code
Resolve thread concurrency security issues
删库跑路、“投毒”、改协议,开源有哪几大红线千万不能踩?
The development context of Ba Kong Yuan universe industry