原文链接: https://leetcode-cn.com/problems/combine-two-tables 英文原文Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | personId | int | | lastName | varchar | | firstName | varchar | +-------------+---------+ personI…
标签详情
数据库 分类
原文链接: https://leetcode-cn.com/problems/second-highest-salary 英文原文Table: Employee +-------------+------+ | Column Name | Type | +-------------+------+ | id | int | | salary | int | +-------------+------+ id is the primary key column for this table. Ea…
原文链接: https://leetcode-cn.com/problems/nth-highest-salary 英文原文Table: Employee +-------------+------+ | Column Name | Type | +-------------+------+ | id | int | | salary | int | +-------------+------+ id is the primary key column for this table. Each …
原文链接: https://leetcode-cn.com/problems/rank-scores 英文原文Table: Scores +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | score | decimal | +-------------+---------+ id is the primary key for this table. Each row …
原文链接: https://leetcode-cn.com/problems/consecutive-numbers 英文原文Table: Logs +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | num | varchar | +-------------+---------+ id is the primary key for this table. Write…
原文链接: https://leetcode-cn.com/problems/duplicate-emails 英文原文Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | email | varchar | +-------------+---------+ id is the primary key column for this tabl…
原文链接: https://leetcode-cn.com/problems/customers-who-never-order 英文原文Table: Customers +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | name | varchar | +-------------+---------+ id is the primary key column fo…
原文链接: https://leetcode-cn.com/problems/department-top-three-salaries 英文原文Table: Employee +--------------+---------+ | Column Name | Type | +--------------+---------+ | id | int | | name | varchar | | salary | int | | departmentId | int | +-----------…
原文链接: https://leetcode-cn.com/problems/department-highest-salary 英文原文Table: Employee +--------------+---------+ | Column Name | Type | +--------------+---------+ | id | int | | name | varchar | | salary | int | | departmentId | int | +--------------+…
原文链接: https://leetcode-cn.com/problems/delete-duplicate-emails 英文原文Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | email | varchar | +-------------+---------+ id is the primary key column for th…
原文链接: https://leetcode-cn.com/problems/rising-temperature 英文原文Table: Weather +---------------+---------+ | Column Name | Type | +---------------+---------+ | id | int | | recordDate | date | | temperature | int | +---------------+---------+ id is the…
原文链接: https://leetcode-cn.com/problems/trips-and-users 英文原文Table: Trips +-------------+----------+ | Column Name | Type | +-------------+----------+ | id | int | | client_id | int | | driver_id | int | | city_id | int | | status | enum | | request_at…
原文链接: https://leetcode-cn.com/problems/big-countries 英文原文Table: World +-------------+---------+ | Column Name | Type | +-------------+---------+ | name | varchar | | continent | varchar | | area | int | | population | int | | gdp | int | +-----------…
原文链接: https://leetcode-cn.com/problems/classes-more-than-5-students 英文原文Table: Courses +-------------+---------+ | Column Name | Type | +-------------+---------+ | student | varchar | | class | varchar | +-------------+---------+ (student, class) is …
原文链接: https://leetcode-cn.com/problems/human-traffic-of-stadium 英文原文Table: Stadium +---------------+---------+ | Column Name | Type | +---------------+---------+ | id | int | | visit_date | date | | people | int | +---------------+---------+ visit_da…
原文链接: https://leetcode-cn.com/problems/not-boring-movies 英文原文Table: Cinema +----------------+----------+ | Column Name | Type | +----------------+----------+ | id | int | | movie | varchar | | description | varchar | | rating | float | +-------------…
原文链接: https://leetcode-cn.com/problems/swap-salary 英文原文Table: Salary +-------------+----------+ | Column Name | Type | +-------------+----------+ | id | int | | name | varchar | | sex | ENUM | | salary | int | +-------------+----------+ id is the pri…
原文链接: https://leetcode-cn.com/problems/reformat-department-table 英文原文Table: Department +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | revenue | int | | month | varchar | +-------------+---------+ (id, month)…
数据库操作DMLCREATE TABLECREATE TABLE语句用于创建数据库中的表。语法是: CREATE TABLE 表名称 ( 列名1 数据类型, 列名2 数据类型, 列名3 数据类型, .... ); 例: CREATE TABLE user ( id integer, user_name varchar(255), email varchar(255), age integer, address varchar(255) ) 注意:字段类型char和varchar区别: 容纳固定长…