Finding Records
Find records in Standard with an exact match or using parameters and limits. Let's continue with the vehicle Standard.
Format
To find exact matching records, we use a creation query without the +.
[std_name] (const1, const2, [...])
To find using parameters:
[std_name] <const1 val, const2 val, [...]>
When finding with parameters, you can add a limit:
[std_name] <const1 val, const2 val, [...], LIMIT 5>
Examples
[vehicle] ("VINNUM", "Honda", "Accord", "Green")
This query will return one record that matches those parameters. To check if there is more than one record, we can run count with this query:
count [vehicle] ("VINNUM", "Honda", "Accord", "Green")
To find and count all Honda vehicles, we can run:
[vehicle] <make "Honda">
#Count all Hondas in vehicle table
count [vehicle] <make "Honda">
Now if we want to find only five Honda vehicles, we can run:
[vehicle] <make "Honda", LIMIT 5>
#Get even more specific
[vehicle] <make "Honda", model "Accord", LIMIT 5>
Find with Conditions
Finding Standard conditions is like writing in English. Enter the condition between the constraint name and value.
[vehicle] <year GREATER THAN 1997, LIMIT 5>
- STARTS WITH
- ENDS WITH
- CONTAINS
- GREATER THAN
- GREATER THAN OR EQUAL TO
- LESS THAN
- LESS THAN OR EQUAL TO
- AND
- OR