Update A Set Photo = '' Where Photo Is NULL还是想将Photo改为其它ID的Photo值啊?
update t set Photo=(select Photo from A where Photo is not null) from A t where t.Photo is null
DB_Jackaroo() ( ) 信誉:100 Blog 加为好友 2007-05-09 17:32:28 得分: 0
我想改成不为那个为空的值
------------------------------------------ 随便取哪一个不为空的值吗? Update A Set Photo = (select top 1 aa.Photo From A aa Where Photo is not null) From A Where Photo Is NULL
Set Photo = ''
Where Photo Is NULL还是想将Photo改为其它ID的Photo值啊?
set
Photo=(select Photo from A where Photo is not null)
from
A t
where t.Photo is null
我想改成不为那个为空的值
------------------------------------------
随便取哪一个不为空的值吗?
Update A
Set Photo = (select top 1 aa.Photo From A aa Where Photo is not null)
From A
Where Photo Is NULL
set
Photo=n.Photo
from
A m,A n
where
m.Photo is null
and
n.Photo is not null