当前位置:网站首页>如何取得对象的DDL信息
如何取得对象的DDL信息
2022-07-27 06:07:00 【哇哈哈】
如何取得对象的DDL信息
其他答案1:
V8R6提供了类似oracle dbms_metadata的包,用于获取对象的定义信息。
test=# select dbms_metadata.GET_DDL('table','t1'); get_ddl -------------------------- CREATE TABLE PUBLIC.T1( + ID INTEGER + ) + test=# select dbms_metadata.get_index_ddl('ind_t1','public'); get_index_ddl --------------------------------------------------- CREATE INDEX ind_t1 ON public.t1 USING btree (id)+ |
其他答案2:
oracle:
1、查看数据库表的定义写法:
select dbms_metadata.get_ddl(‘TABLE’,‘TABLENAME’,‘USERNAME’) from dual;
2、查看索引的SQL
select dbms_metadata.get_ddl(‘INDEX’,‘INDEXNAME’,‘USERNAME’) from dual;
3、查看创建主键的SQL
SELECT DBMS_METADATA.GET_DDL(‘CONSTRAINT’,‘CONSTRAINTNAME’,‘USERNAME’) FROM DUAL;
希望对你有帮助
边栏推荐
- Interpretation of deepsort source code (IV)
- Common problems in converting pytorch to onnx
- 请教大佬们一个问题,pgsqlcdc任务运行一段时间就不能监测变化了,重启就可以了,这个该从哪方面入
- 【QT】capture.obj:-1: error: LNK2019: 无法解析的外部符号 __imp_htons(解决方法)
- Interpretation of deepsort source code (I)
- 使用pip命令切换不同的镜像源
- 用typescript实现排序-递增
- 李沐动手学深度学习V2-transformer和代码实现
- Drools (5): drools basic syntax (3)
- Gbase 8C - SQL reference 6 SQL syntax (11)
猜你喜欢

How to learn C language? This article gives you the complete answer

零号培训平台课程-2、SSRF基础

Talk about multimodality of fire

火狐浏览器,访问腾讯云服务器的时候,出现建立安全连接失败的问题。

Vscode connection remote server development

newest! SASAC releases new measures for digital transformation of state-owned enterprises

大疆livox定制的格式CustomMsg格式转换pointcloud2

Watermelon book learning notes - Chapter 4 decision tree

网易云信亮相 GIAC 全球互联网架构大会,解密新一代音视频架构在元宇宙场景的实践...

整体二分?
随机推荐
TS learning (VIII): classes in TS
PHP defines the array using commas,
Ci framework learning of PHP
Pytorch model
Student achievement management system based on SSM
零号培训平台课程-1、SQL注入基础
MySQL optimization SQL related (continuous supplement)
Jest single test style problem [identity obj proxy] NPM package
(posted) comparison of Eureka, consumer and Nacos 2
Consideration on how the covariance of Kalman filter affects the tracking effect of deepsort
指令集董事长潘爱民出席2022 ECUG Con,为中国技术力量发声
美联储SR 11-7:模型风险管理指南(Guidance on Model Risk Management)-万字收藏
R2LIVE代码学习记录(3):对雷达特征提取
Codeforces Round #804 (Div. 2)(5/5)
Common problems in converting pytorch to onnx
Misunderstanding of slice slice in golang
Gbase 8C - SQL reference 6 SQL syntax (13)
Brief introduction of simulation model
Drools (5): drools basic syntax (3)
Relevant principles of MySQL index optimization