查看当前所在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. chrome浏览器设置允许跨域

    前情 在访问测试搭建的测试环境的时候,发现接口因为跨域全部失败了,服务端又不想设置允许跨域,又急于使用,于是想到是不是可以使用跨域浏览器 放开chrome的跨域设置步骤 复制一个chrome快捷图标, ...

  2. SpringBoot 整合Swagger2 踩坑记录

    SpringBoot 整合Swagger2 踩坑记录 Failed to start bean 'documentationPluginsBootstrapper'; nested exception ...

  3. QEMU CVE-2021-3947 和 CVE-2021-3929 漏洞利用分析

    QEMU CVE-2021-3947 和 CVE-2021-3929 漏洞利用分析 ‍ CVE-2021-3947 信息泄露漏洞 漏洞分析 漏洞点是 nvme_changed_nslist stati ...

  4. 洛谷P7911 [CSP-J 2021] 网络连接题解

    普通的模拟题,数据很小,基本排除超时超空间的可能 上代码: #include<bits/stdc++.h> #define LL long long using namespace std ...

  5. docker创建Tomcat

    安装docker 查找tomcat docker search tomcat 下载镜像 docker pull tomcat 查看下载的镜像 docker images 运行Tomcat docker ...

  6. 不错的AI项目集合

    最近收集了一些不错的AI项目. AutoGPT:AutoGPT 的愿景是让每个人都可以使用和构建无障碍 AI.我们的使命是提供工具,以便您可以专注于重要的事情. Stable Diffusion we ...

  7. TypeScript 总结

    js 类型分为两种:基本数据类型和复杂数据类型 基本数据类型主要有:number.string.boolean.null.undefined.symbo(es6新增).BigInt(es10新增) t ...

  8. Flutter问题 Flutter MissingPluginException(No implementation found for method xxx on channel xxx)

    问题如题 有时候项目跑着跑着突然控制台就报了这个错,用hot restart也没有用,问题的本质是plugin没有找到,这时候有两种方法 flutter clean,会将依赖清除,这时候再重新pub ...

  9. manim边学边做--旋转

    本篇介绍Manim中的两个旋转类的动画,名称差不多,分别是Rotate和Rotating. Rotate类主要用于对图形对象进行指定角度.围绕特定点的精确旋转,适用于几何图形演示.物理模拟和机械运动展 ...

  10. Postgres中的Common Table Expression

    Common Table Expression 是 pg 里极为重要的特性.这个特性简单的说就是 INSERT/UPDATE/DELTE 三项操作可以返回结果集.如: update item set ...