MS Access 2003 - What is the equal function in code?
What i开发者_开发技巧s the code for an equal function?
This values in this column and the values in this column and the values in this column all equal this column.
Your question is a bit vague but I'll assume you mean "How do you do this in SQL?"
Columns in the same table
SELECT column1, column2, column3, column4 FROM myTable
WHERE column1 = column4
AND column2 = column4
AND column3 = column4
If on the other hand you meant to compare the total values of columns 1, 2 and 3 to column4 it would look like:
SELECT column1, column2, column3, column4 FROM myTable
WHERE column1 + column2 + column3 = column4
You can learn a lot more about SQL's syntax by taking a look at http://www.w3schools.com/sql
精彩评论