Northwind数据库练习 [英] Northwind database exercise

查看:71
本文介绍了Northwind数据库练习的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是

选择员工的名字,连接到姓氏,用空格分隔。拨打员工姓名栏目,

此员工姓名长度,名称A位置中第一个a的位置,以及来自

名称'Substring。'使用别名按员工姓名订购结果。

返回9行。



我在做这个时遇到了问题。我做下一步的唯一部分是无法理解的:这部分是我在SQL教程的帮助下完成的。



SELECT FirstName +''+ LastName

FROM Employees;

The question is
Select the Employee's First Name, concatenated to the Last name, separated by a space. Call the column 'Employee Name,'
the length of this employee name Length, the location of the first 'a' in the name 'A Location,' and the 5–9 characters from
the name 'Substring.' Order the results by the Employee Name using the alias.
9 rows returned.

I'm having problems doing this one. The only part I did and can't understand to do the next step was: And this part I did with help of your SQL tutorial.

SELECT FirstName + ' ' + LastName
FROM Employees;

推荐答案

你几乎完成了它的第一部分...我会给你一个正确的方向...用一个AS关键字命名一列,如下所示:



You have almost completed the first portion of it... I'll give you a push in the right direction... Name a column by using the AS keyword, like this:

select FirstName + ' ' + LastName as [Employee Name]
from Employees;





下一部分需要使用len()函数,instr(),mid()和Order By。 br />


对此有所了解。



The next parts you need to use the len() function, instr(), mid() and Order By.

Have a crack at it.


这篇关于Northwind数据库练习的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆