查看当前所在catalog:select current_catalog();

创建catalog:create catalog if not exists harley_test;

创建表

create table if not exists lakehouse_sit.default.harley_overtime
(
id int comment '序号',
type int comment '1:加班,0:调休',
overtime_date string comment '加班/调休日期',
overtime_hours double comment '加班时长(单位:小时)'
)

插入数据

insert into lakehouse_sit.default.harley_overtime values (1,1,'20241203',5);

查看建表语句

show create table lakehouse_sit.default.harley_overtime;

查看表结构:desc lakehouse_sit.default.harley_overtime;

修改字段注释:

alter table lakehouse_sit.default.harley_overtime alter column overtime_hours comment '加班/调休时长(单位:小时)';

添加字段:

alter table lakehouse_sit.default.harley_overtime add column comment_msg string comment '备注';

删除字段:

alter table lakehouse_sit.default.harley_overtime drop column comment_msg;

Azure Databricks - [02] 常用SQL的更多相关文章

  1. Sqlite常用sql语句

    sqlite常用sql语句 --返回UTC时间 select CURRENT_TIMESTAMP; --返回本地时间 select datetime(CURRENT_TIMESTAMP,'localt ...

  2. 【SQL】MaxComputer常用SQL与注意小结

    MaxComputer常用SQL 1.建表 CREATE TABLE dwd_tfc_ctl_signal_phasedir ( cust_inter_id STRING COMMENT '客户路口I ...

  3. Mysql 常用 SQL 语句集锦

    Mysql 常用 SQL 语句集锦 基础篇 //查询时间,友好提示 $sql = "select date_format(create_time, '%Y-%m-%d') as day fr ...

  4. oracle(sql)基础篇系列(一)——基础select语句、常用sql函数、组函数、分组函数

        花点时间整理下sql基础,温故而知新.文章的demo来自oracle自带的dept,emp,salgrade三张表.解锁scott用户,使用scott用户登录就可以看到自带的表. #使用ora ...

  5. 常用SQL[ORACLE]

        1.常用系统函数 2.常用sql语句 3.一些定义和关键字 4.需要注意点   1.常用系统函数 ↑ --decode decode(column,if_value,value,elseif_ ...

  6. SQL Azure (14) 将云端SQL Azure中的数据库备份到本地SQL Server

    <Windows Azure Platform 系列文章目录> 注意: 1.只有SQL Server 2012 CU4及以上版本才支持本章内容 2.当你的数据库文件很大时,建议优化以下内容 ...

  7. SQL Azure (16) 创建PaaS SQL Azure V12数据库

    <Windows Azure Platform 系列文章目录> 本文介绍的是国内由世纪互联运维的Azure China 最新的Azure PaaS SQL Database(SQL Azu ...

  8. Oracle常用SQL查询(2)

    三.查看数据库的SQL 1 .查看表空间的名称及大小 select  t.tablespace_name,  round ( sum (bytes / ( 1024 * 1024 )), 0 ) ts ...

  9. Oracle常用SQL查询

    一.ORACLE的启动和关闭 1.在单机环境下要想启动或关闭oracle系统必须首先切换到oracle用户,如下: su - oracle a.启动Oracle系统 oracle>svrmgrl ...

  10. Mysql 常用 SQL 语句集锦 转载(https://gold.xitu.io/post/584e7b298d6d81005456eb53)

    Mysql 常用 SQL 语句集锦 基础篇 //查询时间,友好提示 $sql = "select date_format(create_time, '%Y-%m-%d') as day fr ...

随机推荐

  1. 【慢速加实现64位乘法】AcWing90 64位整数乘法

    题意 求\(a*b\%q(1 \leq a,b,q \leq 10^{18})\)的值. 题解 在计算机中,数字都是以二进制数表示的.例如:\(5_{10}\)的二进制数为\(101_2\). 对于\ ...

  2. 2000 Star,是时候为我的开源项目更新下功能了

    哈喽啊,我是阿朗,马上就要年末了,已经半年多没有更新文章了.年初定的计划早已经忘的一干二净.再不捡起来一点东西,就要2025年了. 要写点东西了. 你是一个博客撰写专家,你擅长开发领域,你喜欢使用通俗 ...

  3. CW信号的正交解调

    1.CW信号   CW可以叫做等幅电报,它通过电键控制发信机产生短信号"."(点)和长信号"--"(划),并利用其不同组合表示不同的字符,从而组成单词和句子. ...

  4. Java 基于接口的动态代理

    UserDao接口 package com.pry.cn; public interface UserDao { public int add(int a,int b); public String ...

  5. 【PHP】读取本地文件夹中所有图片并显示

    <? //获取文件夹下的所有文件 $dir_str = ''; $imgType = array('gif','png','jpg','jpeg','bmp'); $handle = opend ...

  6. shell学习之路——取参数

    shell中参数的调用方式: 1.$0-9:表示第0个到第9个参数,其中$0表示文件执行路径.如:$0,$1. 2.${10以后}:如果参数数目大于9个,可以用${10},${11}...等方式表示. ...

  7. Ant入门简单实例

    一.构建ant环境 要使用ant首先要构建一个ant环境,步骤很简单: 1) 安装jdk,设置JAVA_HOME ,PATH ,CLASS_PATH(这些应该是看这篇文章的人应该知道的) 2) 下载a ...

  8. 基于开源IM即时通讯框架MobileIMSDK:RainbowChat-iOS端v5.0版已发布

    关于MobileIMSDK MobileIMSDK 是一套专门为移动端开发的开源IM即时通讯框架,超轻量级.高度提炼,一套API优雅支持UDP .TCP .WebSocket 三种协议,支持iOS.A ...

  9. asp.net mvc中换肤机制类库 ThemedViewEngines

    制作blog系统或者通用cms系统的时候,我们经常会用到Theme功能.asp.net mvc中的一种实现方式,是继承实现RazorViewEngine即可. 这是在GitHub中找到的一个示例:ht ...

  10. MS Speech/ azure

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...