Is SQL able to do something along the lines of this: SELECT * FROM table WHERE column = everything
SELECT statements SELECT column1, column2 FROM table1, table2 WHERE column2='value'; In the above SQL statement: The SELECT clause specifies one or more columns to be retrieved; to specify multiple columns, use a comma and a space between column names. To retrieve all columns, use the wild card * (an asterisk).
SQL WHERE with ANY, ALLANY and ALL operators are used with WHERE or HAVING. ANY and ALL operate on subqueries that return multiple values. ANY returns true if any of the subquery values meet the condition. ALL returns true if all of the subquery values meet the condition.
ALL means that the condition will be true only if the operation is true for all values in the range.
For anyone who NEEDS the column name in the query for whatever reason (probably dynamic SQL), a nice alternative would be SELECT * FROM table WHERE column = column
This is very similar to WHERE 1=1
, however it includes the column name, which my solution required, and maybe a few others will require as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With