- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有这张 table 1
idproduct(PK) | date_to_go
1 2010-01-18
2 2010-02-01
3 2010-02-21
4 2010-02-03
和另一个控制 date_to_go 更新的表 2
id | idproduct(FK) | prev_date_to_go | date_to_go | update_date
1 1 2010-01-01 2010-01-05 2009-12-01
2 1 2010-01-05 2010-01-10 2009-12-20
3 1 2010-01-10 2010-01-18 2009-12-20
4 3 2010-01-20 2010-02-03 2010-01-05
因此,在此示例中,对于 table1.idproduct #1 2010-01-18 是实际的 date_to_go 和 2010-01-01(table2.prev_date_to_go,第一个 reg)是原始的 date_to_go。
使用这个查询
select v.idproduct, v.date_to_go, p.prev_date_to_go original_date_to_go
from table1 v
left join produto_datas p on p.idproduto = v.idproduto
group by (v.idproduto)
order by v.idproduto
我可以假设 original_date_to_go 将是 table2 的第一个相关 reg 吗?
idproduct | date_to_go | original_date_to_go
1 2010-01-18 2010-01-01
2 2010-02-01 NULL
3 2010-02-21 2010-01-20
4 2010-02-03 NULL
最佳答案
不,您不能假设您总是从第一行获得 prev_date_to_go
的值。当您选择 GROUP BY 中未列出的列时,您可以获得的值可能是来自任何行的值。请参阅 MySQL 文档 GROUP BY and HAVING with Hidden Columns了解更多信息:
When using this feature, all rows in each group should have the same values for the columns that are ommitted from the GROUP BY part. The server is free to return any value from the group, so the results are indeterminate unless all values are the same.
关于MySql 左加入几个 regs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2581147/
这个问题已经有答案了: What is the best way to set a register to zero in x86 assembly: xor, mov or and? (1 个回答)
中有3个事件fns重装 ,我可以对两者做同样的事情 reg-event-db和 reg-event-fx . reg-event-db之间的主要区别是什么, reg-event-fx和 reg-eve
我将 Verilog 与 modelSim 一起使用,当我尝试将 reg 变量分配给另一个 reg 变量的不同部分时出现以下错误: ** Error: Range width must be grea
我在Oracle Forms中要求编写一个PLSQL块,该块将通过包含逗号分隔记录的游标从数据库中读取数据。我已经完成了逻辑,但想检查一下我开发的这个逻辑是否可以以任何方式改进。。因此,我使用subs
使用以下代码是否存在执行速度差异: cmp al, 0 je done 以及以下内容: or al, al jz done 我知道JE和JZ指令是相同的,并且使用OR可以使字节大小提高1个字节。但是,
我正在维护和扩展诊断测试套件的功能,这段代码多次出现,但我不确定它的作用: int ret = 0, i, *reg; int size = sizeof(Regs)/sizof(Reg); for(
在一般情况下,可以使用内存或寄存器操作数的指令如何使用内存操作数变慢然后 mov + mov -> 指令 -> mov + mov 基于在 Agner Fog's instruction tables
假设module_a里面有register_a,它需要链接到module_b。 register_a 是否应该单独声明并分配给 module_a 的输出: reg register_a; assign
这是 ls -R 命令的输出: .: compare.sh searchByFile.sh startup.sh temp.txt test.sh compare.sh~ search
众所周知,WaveFront (AMD OpenCL) 与 WARP (CUDA) 非常相似:http://research.cs.wisc.edu/multifacet/papers/isca14-
我想将一张图片与其他图片列表一张一张地进行比较,然后我想知道哪张图片的相似度更高。 我试图用 Python OPENCV facerec_demo.py 做同样的事情,但它给出了错误: Attribu
打开光驱硬盘的自动运行特性 REG 复制代码 代码如下: Windows Registry Editor Version 5.00</p>
代码如下: Windows Registry Editor Version 5.00</p> <p>[HKEY_CURRENT_USER\Software\Microso
代码如下: Windows Registry Editor Version 5.00</p> <p>[HKEY_LOCAL_MACHINE\SYSTEM\ControlS
代码如下: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\exefile] @="应用程序&q
我知道在 REG 文件的行首放一个分号表示它已被注释。我想知道是否可以在一行(一行的右侧)后添加注释? 最佳答案 在同一行的注释前加上分号就足够了。换句话说,reg 文件在带有注册表项的一行以及整行注
我在 Verilog 中有这个架构/拓扑: 如何访问内部注册 IntReg ,这不是 IntModule 中的输入/输出,在 SystemVerilog 中? always @(posedge clk
我正在尝试使用字节流读取包含普通文本数据的文件。而且我知道在字节流中,每个字节都将被一个一个地读取。因此,如果我通过字节流读取文本文件中的数据 Hi How are you!!!!! 那么它应该给我每
我有一个运行 IIS/Asp.net 的网站的登录表单,在预订期间因为非常缓慢。 在登录页面我正在做的: $("#submit1").trigger('click') //this will logi
这个问题在这里已经有了答案: 关闭10 年前。 Possible Duplicate: non-static variable cannot be referenced from a static
我是一名优秀的程序员,十分优秀!