

Since we have a place record in the database with some fields, we can use a SELECT statement to take a look at it. SELECT is followed by the fields to display and ends with FROM and the target. In this case the target is place: all place records in the database.
The output is an array of the address and name fields of every place record in the database.
Instead of selecting all records from a table, you can add a WHERE clause to just select the ones that match a condition - or none at all, if no records match the condition.
Instead of typing out each field, you can use * to show all of them.
To select all fields minus a few, you can use OMIT after the star, followed by the unneeded field names.
VALUE and ONLY keywordsYou can add VALUE right after the SELECT keyword if you only care about the value of a single field, and not its name.
The ONLY keyword works in other statements too, such as SELECT. It will always work if you give it an exact record ID, because there can only be one.
However, if you follow it with just a table name, the database is no longer sure that only one record will be returned.
You can use the LIMIT keyword here to guarantee a maximum number of records returned. If it is followed with 1, the database will know that no more than a single record will be returned and the ONLY keyword can be used.
In this case, we should ensure that the single record returned is the one that we expect it to be. If we had used a random ID like place:llsqrb50cm7rkvqli2sg instead of place:surreal_library, we could use WHERE to make sure that 'Surreal Library' is the record returned.
A SELECT statement isn't just limited to a table's fields. You can create and name new fields as you see fit. They can be made from the values of existing fields, or just made up on the spot.
And the target after FROM doesn't need to be a table name either. You can select from raw data too.
Because the second object has no value for the field address, it will show up as NONE.
You can even select from a combination of table name and raw data. Whatever SurrealDB sees after the FROM clause can be selected and used as output.