Skip to content
Advertisement

Converting weight to grams in a SELECT statement

I have a Table called parts which looks like this:

Now I want to select the PNO, color,weight and city for “non-Paris” parts with a weight greater than ten pounds. This is not that difficult:

Now to the part I don’t understand. How can I add a column to my result which shows the weight converted in to grams (multiplied by 454 since one pound equals 0.454 kg). The result should look like this:

Advertisement

Answer

Just add the extra column in as a calculation with an alias:

Advertisement