This article describes how to use MimerValidator to check SQL queries.
This article describes how to use Mimer Validator to check SQL queries.
Q: assume that one of my tables contains (a, B, c, d) and (a, B) to form a key combination. Can I write this query in the column value? For example:
The Code is as follows:
Select a, c, d from mytable
Where (a, B) in (1, 2), (1, 4), (1, 5 ))
A: Yes.
If you suspect that some SQL architectures are valid, run Mimer Validator. In this case, your query (the query you log on to the validator) will get the following results:
* In SQL-92, invalid
* Valid in SQL-99 and SQL _2003 with the following comments:
F641, "Row and table constructors"
T051, "Row types"
F561, "Full value expressions"
The following features or Core SQL-99 (draft) outside of the Core SQL-200x will be used ):
F641, "Row and table constructors"
T051, "Row types"
F561, "Full value expressions"
That is to say, if your special database system does not support those selection features, you will still receive an error message.
You may want to try the following query:
SELECT a, c, d
FROM mytable
WHERE a = 1 AND B = 2
OR a = 1 AND B = 4
OR a = 1 AND B = 5
This query runs very smoothly, because (a, B) is a key, so index query is more effective.