执行数据库的describe命令
来源:互联网 发布:淘宝老兵蜜蜡原石假货 编辑:程序博客网 时间:2024/05/16 18:29
def describe(connection, tablename):
cur =connection.cursor()
cur.execute('select * from %s where 1=0' % tablename)
for desc in cur.description:
column_name = desc[0]
nullable = desc[6]
data_type = desc[1].__name__
data_length = desc[3]
print column_name, nullable, data_type, data_length
cur =connection.cursor()
cur.execute('select * from %s where 1=0' % tablename)
for desc in cur.description:
column_name = desc[0]
nullable = desc[6]
data_type = desc[1].__name__
data_length = desc[3]
print column_name, nullable, data_type, data_length
0 0
- 执行数据库的describe命令
- Oracle使用describe命令
- sqlserver 查看数据库正在执行的命令
- DESCRIBE
- oracle查看创建表的sql语句1,DESCRIBE命令使用方法如下:SQL>descri
- live555源码分析---- DESCRIBE命令处理
- live555源码分析---- DESCRIBE命令处理
- live555源码分析---- DESCRIBE命令处理
- live555源码分析---- DESCRIBE命令处理
- live555源码分析---- DESCRIBE命令处理
- live555源码分析---- DESCRIBE命令处理
- SQL Server 对SqlCommand 数据库执行命令的方法:
- 数据库在系统命令执行程序的使用
- scsi命令的执行
- scsi命令的执行
- scsi命令的执行
- shell命令的执行
- 命令的执行顺序
- 博客被盗经历
- Step into Scala - 23 - 与 Java 互相调用
- 良好的书写规范提高PHP代码执行效率【上】
- 点击body获取点击的对象
- android 时间格式 各种转换
- 执行数据库的describe命令
- 良好的书写规范提高PHP代码执行效率【下】
- rust language
- 运筹学知识:决策分析技术-乐观准则,悲观准则,后悔准则
- Step into Scala - 24 - Option
- oracle表不能DDL和存储过程不能创建处理方法
- Python学习笔记(七)
- LeetCode--Minimum Window Substring(最小匹配子串)
- Jboss Server Error:Server already running on localhost