Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    1

    Unanswered: Derived Attributes in MySQL

    Hi there,

    Does anyone know how to go about specifying derived attributes in MySQL?

    I have a table where one attribute is a result of multiplying two other attributes (for example, totalPrice derived from price * unitPrice).

    Is there a way of doing this apart from generating the result on the fly by a script? Thanks in advance for any replies,

    Best regards,

    Arman

  2. #2
    Join Date
    Sep 2003
    Posts
    69
    Yep.

    SELECT row * row FROM table;

    If you need to specify a row, use a WHERE clause.

  3. #3
    Join Date
    Sep 2003
    Posts
    69
    heh... sorry COL * COL not, ROW * ROW (that makes no sense :P)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •