running sql in grails console
Copy this code and paste it in your HTML
def service
= ctx.
getBean("userService") def dataSource
= ctx.
dataSource def result
= db.
rows("""(SELECT id, points FROM user WHERE points <= 100 ORDER BY points DESC LIMIT 5)""")
Report this snippet
Comments
Subscribe to comments