![](https://img-blog.csdnimg.cn/20210121000839600.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
database
文章平均质量分 52
sqlserver
Xい
这是最好的时代
展开
-
sqlserver查询表中某列数据类型
查询表中某列不为空的数据清空表中数据改变某列数据类型表中增加某列表中增加自增id列复制表表中插入数据查询表中重复数据判断数字字段首位是否为1判断手机号格式是否正确更改表中某一数据内容...原创 2022-04-11 11:54:51 · 2606 阅读 · 0 评论 -
SQLZOO_SELECT basics(sql server)
1、Modify it to show the population of GermanySELECT population FROM world WHERE name = 'Germany'2、Show the name and the population for ‘Sweden’, ‘Norway’ and ‘Denmark’.select name,population from world where name in ('Sweden', 'Norway','Denmark')3.原创 2022-02-17 17:24:36 · 381 阅读 · 0 评论 -
LeetCode_176. 第二高的薪水
Employee 表:±------------±-----+| Column Name | Type |±------------±-----+| id | int || salary | int |±------------±-----+id 是这个表的主键表的每一行包含员工的工资信息编写一个 SQL 查询,获取并返回 Employee 表中第二高的薪水 。如果不存在第二高的薪水,查询应该返回 null 。select max(salary) as s原创 2022-02-17 13:56:14 · 443 阅读 · 0 评论 -
SQLZOO_The JOIN operation(sql server)
1、Modify it to show the matchid and player name for all goals scored by Germany. To identify German players, check for: teamid = ‘GER’select matchid,player from goal where teamid='GER'2、Show id, stadium, team1, team2 for just game 1012SELECT id,stadiu.原创 2022-02-21 16:37:12 · 108 阅读 · 0 评论 -
SQLZOO_SUM and COUNT(sql server)
1、Show the total population of the world.select sum(population) from world2、List all the continents - just once each.select distinct continent from world3、Give the total GDP of Africaselect sum(gdp) from worldwhere continent='Africa'4、How many c.原创 2022-02-21 10:59:30 · 90 阅读 · 0 评论 -
MySQL_创建表,添加表注释,复制表结构
【代码】MySQL_创建表,添加表注释,复制表结构。原创 2021-03-12 16:44:35 · 3796 阅读 · 0 评论 -
SQLZOO_SELECT within SELECT Tutorial(sql server)
1、List each country name where the population is larger than that of ‘Russia’.select name from worldwhere population > (select population from worldwhere name='Russia')2、Show the countries in Europe with a per capita GDP greater than ‘United Kingd.原创 2022-02-21 09:33:44 · 106 阅读 · 0 评论 -
SQLZOO_SELECT from Nobel Tutorial(sql server)
1、Change the query shown so that it displays Nobel prizes for 1950.SELECT * FROM nobel WHERE yr = 19502、Show who won the 1962 prize for Literature.select winner from nobel where yr='1962' and subject='Literature'3、Show the year and subject that won.原创 2022-02-18 11:59:37 · 95 阅读 · 0 评论 -
SQLZOO_SELECT from WORLD Tutorial(sql server)
1、Observe the result of running this SQL command to show the name, continent and population of all countries.select name,continent,population from world2、Show the name for the countries that have a population of at least 200 million.select name from w.原创 2022-02-17 17:34:10 · 146 阅读 · 0 评论 -
LeetCode_175.组合两个表
表1:Person(PersonId 是表主键)±------------±--------+| 列名 | 类型 |±------------±--------+| PersonId | int || FirstName | varchar || LastName | varchar |±------------±--------+表2:Address(AddressId 是表主键)±------------±--------+| 列名原创 2022-02-17 10:35:18 · 116 阅读 · 0 评论