• orcale 基本查询(1)


    orcale 基本查询
        
      查询当前用户下的所有表:
         select * from tab;  
       

      

    查询表结构:
       desc 表名
    设置行宽:

        set linesize 120;
    设置列宽:

        数值类型:      col 列名 for 9999;
        字符类型: col 列名 for a12;

    设置每页显示的数据条数:
        set pagesize 20;

    如果想显示行数, 使用set feedback on;



    设置别名





      在orclae 中 sql里面空值使用
        如果一个表达式中含空值, 则整个表达式为空
        null != null >> 如果你想选取指定列为空的数据, 不能使用=null,
        而是使用is null ,
        同样不为空 is not null

    使用滤空函数
      nvl(列名,指定值)
      

    SQL> --连接符: ||
    SQL> --显示 Hello World
    SQL> select 'hello' || ' world' from dual;

    'HELLO'||'W
    -----------
    hello world

     






  • 相关阅读:
    正则表达式
    网络编程
    多线程
    IO—Data
    IO-对象流
    IO-转换流
    异常
    常用类——File——Random——Math——枚举
    每月博客-20180310
    每月博客-20180204
  • 原文地址:https://www.cnblogs.com/chengbao/p/5382892.html
Copyright © 2020-2023  润新知