示例如下,供参考:
SELECT
'[' || a.content || '](siyuan://blocks/' || a.id || ')' AS __3____pre__链接内容,
'[' || b.content || '](siyuan://blocks/' || b.id || ')' AS __2____pre__上级内容,
'[' || c.content || '](siyuan://blocks/' || c.id || ')' AS __1____pre__文档
FROM
blocks As a
INNER JOIN blocks AS b ON a.parent_id = b.id
INNER JOIN blocks AS c ON a.root_id = c.id
WHERE
(
(a.type = 'p' OR a.type = 'h') AND a.markdown LIKE '%20220311093846-z7l5g46%'
)
ORDER BY
a.hpath
“20220311093846-z7l5g46”是用来举例的链接 ID。
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于