From 845d6106308e3adb7d0cb158ad0300caa45432de Mon Sep 17 00:00:00 2001 From: CyC2018 <1029579233@qq.com> Date: Thu, 7 Jun 2018 13:31:33 +0800 Subject: [PATCH] auto commit --- notes/Leetcode-Database 题解.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/notes/Leetcode-Database 题解.md b/notes/Leetcode-Database 题解.md index a85d82ed..815d1d29 100644 --- a/notes/Leetcode-Database 题解.md +++ b/notes/Leetcode-Database 题解.md @@ -105,15 +105,14 @@ https://leetcode.com/problems/swap-salary/description/ ```sql DROP TABLE IF - EXISTS World; -CREATE TABLE World ( NAME VARCHAR ( 255 ), continent VARCHAR ( 255 ), area INT, population INT, gdp INT ); -INSERT INTO World ( NAME, continent, area, population, gdp ) + EXISTS salary; +CREATE TABLE salary ( id INT, NAME VARCHAR ( 100 ), sex CHAR ( 1 ), salary INT ); +INSERT INTO salary ( id, NAME, sex, salary ) VALUES - ( 'Afghanistan', 'Asia', '652230', '25500100', '203430000' ), - ( 'Albania', 'Europe', '28748', '2831741', '129600000' ), - ( 'Algeria', 'Africa', '2381741', '37100000', '1886810000' ), - ( 'Andorra', 'Europe', '468', '78115', '37120000' ), - ( 'Angola', 'Africa', '1246700', '20609294', '1009900000' ); + ( '1', 'A', 'm', '2500' ), + ( '2', 'B', 'f', '1500' ), + ( '3', 'C', 'm', '5500' ), + ( '4', 'D', 'f', '500' ); ``` ## Solution