开发者

MS Access 2003 - What is the equal function in code?

开发者 https://www.devze.com 2022-12-18 20:06 出处:网络
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\

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

0

精彩评论

暂无评论...
验证码 换一张
取 消