问题描述
在我的购物车项目中,我打算选择属于特定
条件的特定行。在表格中我有列,即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;
推荐答案
这篇关于如何为两列之间的值选择行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!