If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Derived Attributes in MySQL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-15-04, 16:01
arman arman is offline
Registered User
 
Join Date: Mar 2004
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 03-17-04, 02:22
trieder trieder is offline
Registered User
 
Join Date: Sep 2003
Posts: 69
Yep.

SELECT row * row FROM table;

If you need to specify a row, use a WHERE clause.
Reply With Quote
  #3 (permalink)  
Old 03-17-04, 02:22
trieder trieder is offline
Registered User
 
Join Date: Sep 2003
Posts: 69
heh... sorry COL * COL not, ROW * ROW (that makes no sense :P)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On