请告诉我如何解决问题并给我答案。 [英] Please tell how to solve the question and provide me the answer.
本文介绍了请告诉我如何解决问题并给我答案。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于使用以下命令创建的表。说明SQL SELECT命令,以查找在DEL或MUM工作的员工所赚取的第一和第二高薪
CREATE TABLE员工(
ID int NOT NULL AUTO_INCREMENT,
Name varchar( 100),
萨尔小数(10,2),
城市字符(3),< br $>
PRIMARY KEY(ID)
我的尝试:
其实我试过使用Temp命令和Table.but not working。
解决方案
SELECT TOP 2 Sal
FROM 员工
WHERE City = ' DEL' OR City = ' MUM'
ORDER BY Sal DESC 跨度>
For a table created using the following commands. State the SQL SELECT command to find
the 1 st and 2 nd highest salary earned by staff working in DEL or MUM
CREATE TABLE Employees (
ID int NOT NULL AUTO_INCREMENT,
Name varchar(100),
Sal decimal (10,2),
City char (3),
PRIMARY KEY (ID)
What I have tried:
Actually i tried by using Temp commands and Table.but not working.
解决方案
SELECT TOP 2 Sal FROM Employees WHERE City = 'DEL' OR City = 'MUM' ORDER BY Sal DESC
这篇关于请告诉我如何解决问题并给我答案。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文