01 2022 档案

摘要:问题描述 数据SQL create table users( user_id int primary key auto_increment, banned Enum('No', 'Yes'), `role` Enum('client','driver', 'partner') )charset=ut 阅读全文
posted @ 2022-01-25 10:54 UsingStuding 阅读(64) 评论(0) 推荐(0)
摘要:问题描述 数据SQL CREATE TABLE `salary` ( `id` int NOT NULL AUTO_INCREMENT, `amount` int DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf 阅读全文
posted @ 2022-01-25 10:05 UsingStuding
摘要:题目描述 数据SQL CREATE TABLE `salary` ( `id` int NOT NULL AUTO_INCREMENT, `employee_id` int DEFAULT NULL, `amount` int DEFAULT NULL, `pay_date` date DEFAUL 阅读全文
posted @ 2022-01-23 10:30 UsingStuding
摘要:数据SQL CREATE TABLE `Employee` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(32) DEFAULT NULL, salary int DEFAULT NULL PRIMARY KEY (`id`) ) ENGINE 阅读全文
posted @ 2022-01-22 12:06 UsingStuding
摘要:问题描述 数据SQL CREATE TABLE `Employee` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(32) DEFAULT NULL, `departmentId` int DEFAULT NULL, `ManagerId` i 阅读全文
posted @ 2022-01-22 11:25 UsingStuding
摘要:问题描述 数据SQL create table salary ( id int primary key auto_increment, employee_id int, amount int, pay_date date ); create table employee ( employee_id 阅读全文
posted @ 2022-01-22 10:48 UsingStuding
摘要:hive sql中with as语句 环境:hive3.x 使用with as子句进行多表关联时,在最终的关联sql中为某些字段赋予默认值,抛出异常: FAILED: SemanticException [Error 10025]: Expression not in GROUP BY key xx 阅读全文
posted @ 2022-01-18 12:14 UsingStuding
摘要:问题 答案 create table Employee( id int primary key auto_increment, name varchar(32), salary int , departmentId int )charset=utf8mb4; create table departm 阅读全文
posted @ 2022-01-13 10:39 UsingStuding
摘要:问题 数据SQL create table log01 ( id int primary key auto_increment, num int )charset=UTF8MB4; insert into log01(num) values(1), (1), (1), (2), (2), (3), 阅读全文
posted @ 2022-01-12 23:17 UsingStuding
摘要:问题 正解 drop PROCEDURE if EXISTS getNthHighestSalary; create PROCEDURE getNthHighestSalary(N int) begin SELECT * FROM employee e WHERE 4=( SELECT count( 阅读全文
posted @ 2022-01-11 22:21 UsingStuding
摘要:问题描述 原始数据 正解 CREATE TABLE cinema( seat_id int PRIMARY KEY auto_increment, `FREE` boolean )charset=utf8; insert into cinema(free) values(1), (0), (0), 阅读全文
posted @ 2022-01-11 22:16 UsingStuding
摘要:问题 答案 -- 方法1: where子查询+max SELECT max(salary) from leetcode_db.employee AS ta where salary < (select MAX(Salary) from leetcode_db.employee AS tb); -- 阅读全文
posted @ 2022-01-11 09:38 UsingStuding