zoukankan      html  css  js  c++  java
  • oracle 数据库学习

    1.更改数据库用户名密码: alter user '用户名' identified by ’password'.

    2.查看数据库有哪些用户:sqlplus system/password ;select username from dba_users;

    3.查看某个用户下有哪些表: select table_name from user_tables;

    4.查看表结构:select t.table_name,
           t.column_name,
           t.data_type,
           t.data_length,
           t.nullable,
           t.column_id,
           c.comments,
           (SELECT CASE
                     WHEN t.column_name = m.column_name THEN
                      1
                     ELSE
                      0
                   END
              FROM DUAL) iskey
      FROM user_tab_cols t,
           user_col_comments c,
           (select m.column_name
              from user_constraints s, user_cons_columns m
             where lower(m.table_name) = 'qh_outstoresabinfo'
               and m.table_name = s.table_name
               and m.constraint_name = s.constraint_name
               and s.constraint_type = 'P') m
     WHERE lower(t.table_name) = 'qh_outstoresabinfo'
       and c.table_name = t.table_name
       and c.column_name = t.column_name
       and t.hidden_column = 'NO'
     order by t.column_id

  • 相关阅读:
    七牛云的 python sdk 是如何 批量删除资源的
    mysql 主从复制
    django3上线部署踩的坑
    基于linux在线预览
    数据库2
    数据库3
    安装 webstorm--->vue
    Django基础1
    pymysql基础
    前段之jQuery
  • 原文地址:https://www.cnblogs.com/websocket/p/4769491.html
Copyright © 2011-2022 走看看