SELECT * FROM employees中的减号是什么意思WHERE -salary< 0? [英] What does minus mean in SELECT * FROM employees WHERE -salary < 0?

查看:129
本文介绍了SELECT * FROM employees中的减号是什么意思WHERE -salary< 0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请解释工资前面的负面意义

解决方案

好的,我们试试吧。



首先尝试使用以下查询并查看结果。

  SELECT  *  FROM  employees  WHERE  salary<  0  



接下来,尝试以下操作并查看结果。

  SELECT  *  FROM  employees  WHERE  -salary<  0  





您在第一个和第二个查询结果之间看到了什么差异?

这是提示,你将从中得到答案。



让我知道。 :)


Please explain what does minus mean in front of salary

解决方案

Okay, let's try something.

First try with the following query and see what the results.

SELECT * FROM employees WHERE salary < 0


Next, try the following and see the results.

SELECT * FROM employees WHERE -salary < 0



What differences you see between the first and second query results?
That is the hint, from which you will get the answer.

Let me know that. :)


这篇关于SELECT * FROM employees中的减号是什么意思WHERE -salary&lt; 0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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