question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nice to have feature: support RAND() function

See original GitHub issue

Hello,

What do you think about supporting the RAND function? It’s absolutely not critical, just a nice to have feature, especially for random requests.

Select a random vertex: SELECT FROM X ORDER BY RAND() LIMIT 1

Select randomly one vertex from two: SELECT FROM X WHERE RAND() > 0.5

Generate a random value: SELECT RAND()*100

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
DarkKnight1992commented, Nov 22, 2017

I understand but the whole purpose of random function is kinda lost like this since the database will keep growing as of now currently this was applied for class with 75k records and will keep growing exponentially with time. yeah that will be more efficient for sure but this approach has also one downside only the selected data will be randomize which again looses the whole idea of randomizing records.

1reaction
luigidellaquilacommented, Aug 7, 2017

The function name is math_random()

Read more comments on GitHub >

github_iconTop Results From Across the Web

RAND function - Microsoft Support
RAND returns an evenly distributed random real number greater than or equal to 0 and less than 1. A new random real number...
Read more >
Excel RAND and RANDBETWEEN Functions - Contextures
How to use Excel RAND function and RANDBETWEEN function to create random numbers or random text. Easy examples, video and written steps, Free...
Read more >
The rand() function. - Keil forum - Arm Community
The rand() function in the stdlib.h is suppost to generate random numbers. However in C programming the random number is generated from a ......
Read more >
How to generate random numbers in Excel: RAND ... - Ablebits
Excel RAND function - generate random real numbers​​ It returns a random decimal number (real number) between 0 and 1. RAND() is a...
Read more >
Excel RAND and RANDBETWEEN Functions
RAND is a simple function that returns a random number between 0 and 1. It is entered =RAND(). That's it…simple.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found