mysql 获取表信息 表备注等
2024-10-22 04:24:07
select table_name, table_comment, create_time, update_time from information_schema.tables
-- where table_schema = (select database()) -- 当前数据库
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 ,column_key
from information_schema.columns where table_schema = (select database()) and table_name = "sys_notice"
order by ordinal_position
最新文章
- [转载]Jquery中$.get(),$.post(),$.ajax(),$.getJSON()的用法总结
- sqlite数据库的使用helper
- 添加Web引用
- angularjs http 请求拦截器
- 微软今日发布汇总:VS2015, .NET 4.6, C# 6.0, F# 4.0等重量级产品正式上线
- 【GOF23设计模式】代理模式
- MongoDB配置多个ConfigDB的问题(笔记)
- CI框架获取post和get参数_CodeIgniter心得
- python_中文乱码问题
- 安卓 NEXUS6 修改分辨率,density
- UVa 297 - Quadtrees
- 基于MongoDB分布式存储进行MapReduce并行查询
- Python文件中文编码问题
- Randoop测试类和方法(用例自动生成)
- Less合并
- ios高级开发之多线程(二)NSThread技术
- firewalld 防火墙配置
- BZOJ.4337.[BJOI2015]树的同构(树哈希)
- React 入门学习笔记1
- C++模式学习------工厂模式