vault backup: 2024-01-01 23:25:40

This commit is contained in:
2024-01-01 23:25:40 -05:00
parent ecba5522ef
commit 841f75f912
2 changed files with 16 additions and 1 deletions

View File

@@ -83,7 +83,22 @@ SELECT *, (SELECT * FROM events WHERE type = 'activity' LIMIT 5) AS history FROM
### Multiple targets with `FROM`
```SQL
-- This command selects all records from both 'user' and 'admin' tables.
SELECT * FROM user, admin;
-- This command selects all records from the table named in the variable '$table',
-- but only if the 'admin' field of those records is true.
-- This query is equivalent to 'SELECT * FROM user WHERE admin = true'.
LET $table = "user";
SELECT * FROM type::table($table) WHERE admin = true;
-- This command selects a single record from:
-- * the table named in the variable '$table',
-- * and the identifier named in the variable '$id'.
-- This query is equivalent to 'SELECT * FROM user:admin'.
LET $table = "user";
LET $id = "admin";
SELECT * FROM type::thing($table, $id);
```
### `UPDATE` examples

View File

@@ -4,4 +4,4 @@
- soundcloud
- spotfy
- apple music
- data stored in [surrealdb](obsidian://open?vault=Miller%20Knowledgebase&file=Databases%2FSurrealDB%2FSurrealDB%20Local%20Setup)
- data stored in [[SurrealDB Local Setup]]