如何使用SQL查询在SQL中查看表设计... [英] how to see the table design in sql using sql queries ...
本文介绍了如何使用SQL查询在SQL中查看表设计...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用sql查询在sql中查看表设计...
how to see the table design in sql using sql queries ...
推荐答案
您可以使用sp_help
系统存储过程.要查看任何表的设计,请执行sp_help tableName
.
希望这会有所帮助.
一切顺利.
you can usesp_help
system stored procedure. To see the design of any table executesp_help tableName
.
Hope this helps.
All the best.
尝试:
SELECT column_name, data_type, is_nullable, character_maximum_length FROM
information_schema.COLUMNS WHERE table_name='myTable'
in MS SQL
select * from information_schema.COLUMNS WHERE table_name LIKE 'TABLENAME'
select * from information_schema.KEY_COLUMN_USAGE
select * from information_schema.TABLE_CONSTRAINTS
IN ORACLE
DESC TABLENAME
这篇关于如何使用SQL查询在SQL中查看表设计...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文