데이터베이스에 백분율을 추가하고 싶지만 작동하지 않습니다.코드가 데이터베이스에 백분율을 더하지 않습니다.
Use SKILLAGEITDB
go
Create procedure [spAddPercentage]
as
declare @incPercent decimal(2,0)
begin
update OrderDetails
set Value = Value * 0.1
if @incpercent < 0.1
update OrderDetails
set Value = Value * 0.1
if @incpercent > 0.1
update orderdetails
set value = value * 0.1
else
if @incpercent = 0.1
print 'finished'
end
우리에게 입력 및 예상 출력을주십시오 것이라고 수행합니다. – DVT
코드의 아이디어는 orderdetails 테이블의 value 열에 10 %를 추가하는 것입니다. –
"하지만 작동하지 않습니다."격렬하게 도움이되지 않습니다. – dfundako