12.07.2015 Views

Module 13 (Introduction to SQL - Part 2).pdf

Module 13 (Introduction to SQL - Part 2).pdf

Module 13 (Introduction to SQL - Part 2).pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

UPDATE ExampleOf course this might lead <strong>to</strong> messy numbers. We reallywant <strong>to</strong> make sure we don’t get prices like $18.4533.Since we can write arithmetic expressions inside <strong>SQL</strong>, wecan fix it <strong>to</strong> something like this:UPDATE Products SET UnitPrice = CLng((UnitPrice * 110)) /100Try the math out <strong>to</strong> convince yourself that this sort of trickactually works!

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!