当前位置:网站首页>Mysql 通过表明获取字段以及注释
Mysql 通过表明获取字段以及注释
2022-06-24 19:29:00 【Vransy.】
SELECT
column_name,
( CASE WHEN ( is_nullable = 'no' && column_key != 'PRI' ) THEN '1' ELSE NULL END ) AS is_required,
( CASE WHEN column_key = 'PRI' THEN '1' ELSE '0' END ) AS is_pk,
ordinal_position AS sort,
column_comment,
( CASE WHEN extra = 'auto_increment' THEN '1' ELSE '0' END ) AS is_increment,
column_type
FROM
information_schema.COLUMNS
WHERE
table_schema = (
SELECT DATABASE
())
AND table_name = ( '你的表名' )
ORDER BY
ordinal_position;
边栏推荐
猜你喜欢

BPF_ PROG_ TYPE_ SOCKET_ Filter function implementation

最大流问题

【论】Deep learning in the COVID-19 epidemic: A deep model for urban traffic revitalization index

Antdb database online training has started! More flexible, professional and rich

Introduce the overall process of bootloader, PM, kernel and system startup

Shengzhe technology AI intelligent drowning prevention service launched

Sslhandshakeexception: no subject alternative names present - sslhandshakeexception: no subject alternative names present

LeetCode-513. Find the value in the lower left corner of the tree

我国SaaS产业的发展趋势与路径

介绍BootLoader、PM、kernel和系统开机的总体流程
随机推荐
排查到解决问题的过程:浏览器突然无法访问网页,错误代码:0x80004005,最终定位:“电脑打开热点,电脑就不能上网了”
Bld3 getting started UI
socket(1)
How to resolve the 35 year old crisis? Sharing of 20 years' technical experience of chief architect of Huawei cloud database
Redis+Caffeine两级缓存,让访问速度纵享丝滑
[camera Foundation (I)] working principle and overall structure of camera
煮茶论英雄!福建省发改委、市营商办领导一行莅临育润大健康事业部交流指导
2022 international women engineers' Day: Dyson design award shows women's design strength
基于kruskal的最小生成树
面试官:你说你精通Redis,你看过持久化的配置吗?
WMI and PowerShell get TCP connection list
That is to say, "live broadcast" is launched! One stop live broadcast service with full link upgrade
为什么生命科学企业都在陆续上云?
Implementing DNS requester with C language
leetcode:1504. 统计全 1 子矩形的个数
[notes of Wu Enda] multivariable linear regression
TypeScript快速入门
栈的两种实现方式
Functional analysis of ebpf tracepoint
Multi view function in blender