select id
from dbo.table1 with(nolock)
where cid = 622
if recordfromabove neq form.value then proceed the follow code
update table1
set id = 22
where cid = 622
<cfquery name="getinfo">
select id
from dbo.table1 with(nolock)
where cid = 622
</cfquery>
<cfif GetInfo.id NEQ arguments.id>
update table1
set id = #arguments.id#
where cid = 622
</cfif>
Open in new window