Welcome 微信登录

首页 / 操作系统 / Linux / Oracle SQLServer MySQL查看当前所有数据库表名及其他信息

环境:Oracle 11g + SQLServer 2008 R2 + MySQL 5.1Oracle: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.linuxidc.com/topicnews.aspx?tid=12Linux显示文件内容命令Ubuntu 12.04 LTS下编译安装 SVN 1.7相关资讯      Oracle入门教程 
  • 使用SQLT来构建Oracle测试用例  (08/28/2014 06:17:41)
  • Oracle AUTOTRACE 统计信息  (02/18/2013 08:25:40)
  • Linux Oracle服务启动&停止脚本与  (12/16/2012 14:42:37)
  • Oracle入门教程:把表和索引放在不  (07/13/2013 11:21:40)
  • Oracle直接路径加载--append的深度  (02/07/2013 08:26:36)
  • Oracle Connect By用法  (12/16/2012 13:36:10)
本文评论 查看全部评论 (0)
表情: 姓名: 字数