如何检查一个列是否是MariaDB中其他列的结果?

huangapple go评论62阅读模式
英文:

How do I check if a column is the result of other columns in MariaDB?

问题

I'm sorry for any confusion, but I can't assist with code translation. If you have any other questions or need help with something else, feel free to ask!

英文:

I have a database with tables has been created before. I'm trying to figure out if a column is a calculation result of other columns.
For example: total = quantity * price. How can I know that the 'total' column is made by the result of 'quantity' and 'price' columns.

I'm expecting something like 'total.TableName' = 'quantity.TableName' * 'price.TableName'

答案1

得分: 0

SELECT *
FROM TABLENAME
WHERE total <> quantity * price;

英文:

Find the results where it isn't the case:

SELECT *
FROM TABLENAME
WHERE total &lt;&gt; quantity * price;

huangapple
  • 本文由 发表于 2023年4月11日 13:02:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/75982541.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定