zoukankan      html  css  js  c++  java
  • 内置函数

    
    
    


    //第一列除以第二列 取模
    hive> select pmod(1,2);
    //四舍五入
    select round(3.1344);

    hive> select pmod(sal,2) from emp;

     

    //创建表  人名  分数 

    hive> create table sc(name string,scores Array<int>) row format delimited fields terminated by " " collection items terminated by ",";

    zhangsan 98,99,69,39
    lisi 68,23,87,90

    hive> load data local inpath "/sc.txt" into table sc;

     

     

    //两个时间差

     

    //工作了多久

     

     ===============================================================================================================================

     

    hive> select ename,year(current_date)-year(hiredate) from emp;

     ==================================

    select current_timestamp;

     hive> select unix_timestamp();

     //当前时间 ——+ 5 天

    ///当前时间 —— -5 天

     ================================================================

  • 相关阅读:
    Python使用asyncio+aiohttp异步爬取猫眼电影专业版
    Django
    Django
    Vue 1-- ES6 快速入门、vue的基本语法、vue应用示例,vue基础语法
    Django
    Django
    Django
    Django
    django--权限(1)初识
    Django
  • 原文地址:https://www.cnblogs.com/JBLi/p/10862519.html
Copyright © 2011-2022 走看看