如何为两列之间的值选择行

编程入门 行业动态 更新时间:2024-10-26 14:34:36
本文介绍了如何为两列之间的值选择行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在我的购物车项目中,我打算选择属于特定 条件的特定行。在表格中我有列,即CategoryId,ProductId,Season,SeasonFromMonthNumber (值为1)和SeasonToMonthNumber(值为12)。 现在,使用当前月份数(6),我测试了以下代码。结果什么都没有。 任何人都可以给我正确的代码。 从产品WHERE CategoryId = 4和ProductId = 72的SELECT季节SeasonFromMonthNumber> = 6和SeasonToMonthNumber< = 6;

In my shopping cart project, I intend to select a particular row that falls into certain conditions. In the table I have columns namely CategoryId,ProductId,Season,SeasonFromMonthNumber (value is 1) and SeasonToMonthNumber(value is 12). Now, using the current month number(6), I tested with the following code. The result is nothing. Can anyone give me the correct code. SELECT season from product WHERE CategoryId=4 and ProductId=72 and SeasonFromMonthNumber>=6 and SeasonToMonthNumber<=6;

推荐答案

更多推荐

如何为两列之间的值选择行

本文发布于:2023-10-23 16:07:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1521334.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:何为

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!