Neo4j LIMIT子句

Neo4j LIMIT子句用于限制输出中的行数。

句法:

MATCH (n) 
RETURN n 
ORDER BY n.name 
LIMIT i

在这里, 我可能是1, 2, 3?等等

例:

让我们从LIMIT设置为3的数据库中获取记录。

MATCH (n)  
RETURN n.name, n.Marks 
ORDER BY n.Marks DESC 
LIMIT 3

输出

Neo4j LIMIT子句1

带有表达式的LIMIT

LIMIT子句也可以与表达式一起使用。

例:

将” rand”表达式与LIMIT子句一起使用。

MATCH (n) 
RETURN n.name, n.Marks 
ORDER BY n.Marks DESC 
LIMIT toInt(3 * rand())+ 1

输出

Neo4j LIMIT子句2
微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_47517.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?