To the best of my knowledge MySQL does not have a way to do this on the fly such that a field value is contigent upon the values of other fields in the table.

Does it have to be stored in the database at all? Seems to me that calculated values often are best handled at query time rather than taking up unnecessary bytes. Of course, it would depend upon upon the amount of data stored and the amount which needs to be calculated.

If that does not work for you, you may want to investigate your options for calculation during table creation and data insertion. There are plenty of functions which will help with this and they're all well documented in the online manual.

Cheers,

--V

Javier wrote:
Hi All

I've an Excel document that have some data but there are a column that has
a formula related to other cells of the same row.

Now I need to put data in a db but the problem is with this calculated
data. A friend of mine that use Oracle told me that I could define a field
like field1 = field2 + field3, but I can't discover this option in Mysql.

It's possible to make it ? Any other idea about it ?

Thanks in advance

Javier




-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to