Actions71
- Asset Actions
- Attribute Actions
- Block Actions
- Database Actions
- Document Actions
- Markdown Table Actions
- Notebook Actions
- Search Actions
- System Actions
- Tag Actions
Search → SQL Query
AI-generatedSummary
Runs the supplied SQL statement against the SiYuan database using its SQL query API. Use it to retrieve rows with custom SQL, such as filtering or limiting results; the operation does not modify data unless the statement itself does so.
Inputs
- SQL Statement (required) — SQL to run against the SiYuan database. Defaults to
SELECT * FROM blocks LIMIT 10. SiYuan uses SQLite.
Output shape
A list of rows returned by the query.
The rows are passed through from the SiYuan API without reshaping. The number and fields depend on the SQL statement. API or SQL errors are raised; with Continue On Fail enabled, the node returns an error object instead.