由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - SQL Server Update Query - non-unique value
相关主题
请教SQLSQL Query 取transaction table 中本周的记录
请问这个update query有什么问题?SQL Query Question
求解释请问可不可以在sql语句中用序号表示column
这2个query哪个快点,为啥请问数据表里筛选变量名的写法
有趣的Join问题,源于SQL和SAS比较。每天只工作1小时的日子也挺没劲的。
SQL 2000 create index 問題MS SQL Group By Question
SQL aggregate multiple columns in ACCESSRe: [转载] JDBC用完了oracle的large pool (memor
Java SQL --> resultset!!请问如何实现这样一个mysql的query, 谢谢
相关话题的讨论汇总
话题: update话题: query话题: row话题: tableb话题: value
进入Database版参与讨论
1 (共1页)
i****a
发帖数: 36252
1
If the where clause in an update query hit multiple records for the same row
, which one gets written as the final update?
example
TableA:
Name, Value
A, 100
A, 200
A, 300
update TableB
set col1 = TableB.Value
from TableB
where TableB.Name = 'A'
i think it is by physical order but not guaranteed?
v*****r
发帖数: 1119
2
It should fail if updating one row with resultset >1, at least it is case
in oracle.
v*****r
发帖数: 1119
3
i mean subquery resultset > 1

【在 v*****r 的大作中提到】
: It should fail if updating one row with resultset >1, at least it is case
: in oracle.

j*****n
发帖数: 1781
4
This will depend on which row is the last one physically located in the
table for M$.

row

【在 i****a 的大作中提到】
: If the where clause in an update query hit multiple records for the same row
: , which one gets written as the final update?
: example
: TableA:
: Name, Value
: A, 100
: A, 200
: A, 300
: update TableB
: set col1 = TableB.Value

y****w
发帖数: 3747
5
这个经典bug一直被当作经典sql server feature. 8

row

【在 i****a 的大作中提到】
: If the where clause in an update query hit multiple records for the same row
: , which one gets written as the final update?
: example
: TableA:
: Name, Value
: A, 100
: A, 200
: A, 300
: update TableB
: set col1 = TableB.Value

1 (共1页)
进入Database版参与讨论
相关主题
请问如何实现这样一个mysql的query, 谢谢有趣的Join问题,源于SQL和SAS比较。
问个数据库问题SQL 2000 create index 問題
how to get the result in the middle of resultset?SQL aggregate multiple columns in ACCESS
java sql help!Java SQL --> resultset!!
请教SQLSQL Query 取transaction table 中本周的记录
请问这个update query有什么问题?SQL Query Question
求解释请问可不可以在sql语句中用序号表示column
这2个query哪个快点,为啥请问数据表里筛选变量名的写法
相关话题的讨论汇总
话题: update话题: query话题: row话题: tableb话题: value