How to multiply all values of a single column.

Questions by ankur.behal

Showing Answers 1 - 9 of 9 Answers

vishnu7185

  • Aug 1st, 2008
 

Can be done Using Cursors

DECLARE  @product int

DECLARE crsr CURSOR FOR (all values)

SELECT @product = @product * @crsr_value

fetch CURSOR

  Was this answer useful?  Yes

declare @var int
select @var = 1
update

set @var = @var*< colname >
select @var

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions

 
 

 

It looks like you are using an AD Blocker!

 

 

Please Turn OFF your ad blocker

- OR -

LOGIN to continue using GeekInterview website.

 

 

 

Disable
Ad Blocker

 

Learn More

Login
GeekInterview

 

Login

Create your
GeekInterview account

 

Signup

Continue Reading after Disabling

 

Refresh