Pages

Monday, May 23, 2011

Helping out a beginner student in SQL

I recently was asked by a student that is currently taking a database class using SQL Server and he asked the following question.

"Can I multiply a percent (ex. 10%) to an existing column?"
SELECT (COLUMNNAME * 1.10) AS NEWCOLUMNNAME FROM TABLENAME

1 comment:

  1. I added SyntaxHighlighter to the blog and edited your post. All we need to do in the future is encapsulate any code in the below syntax, replacing each '[' with a '<', and change the "sql" to the language of choice short-name.

    [pre class="brush:sql">Code Here[/pre>

    ReplyDelete