Oracle SQLServer MySQL查看当前所有数据库表名及其他信息


环境:Oracle 11g + SQLServer 2008 R2 + MySQL 5.1

Oracle

1. 查看当前库的所有数据表

  1. select * from all_tables;  
  2. select table_name from all_tables;  
  3. select table_name from user_tables;  
  4. select table_name from all_tables where owner='用户名';  

2. 查看表结构

  1. desc 表名;  

SQLServer

1.查询所有表:

  1. select * from sysobjects where xtype = 'U';  

MySQL

1. 显示所有数据库

  1. show database;--有错   
  2. show databases;--这个命令才正确  

2. 显示所有表

  1. show tables;  

3. 显示表结构

  1. desc 表名;  

更多Oracle相关信息见Oracle 专题页面 http://www.bkjia.com/topicnews.aspx?tid=12

相关内容

    暂无相关文章