How SQLite Random() Works

The SQLite random() function returns a pseudo-random integer between -9223372036854775808 and +9223372036854775807.

A pseudo-random number is a number that appears to be random, but is not truely random. A pseudo-random number is not truely random because its value was generated by a known seed. However, a pseudo-random number will appear to be random if the user has no knowledge of the seed or algorithm that created it.

Therefore, pseudo-random numbers are often considered good enough for many applications.

Continue reading

How to Change the Command Line Prompt in SQLite

If you’ve ever used the SQLite command line shell, you’re probably familiar with the default command line prompt. Actually, there are two prompts:

  • The default main prompt looks like this: sqlite>
  • The default continuation prompt looks like this: ...>

If you don’t like these prompts, you can always change them with the .prompt dot command.

This article provides a quick demonstration on how to change these prompts.

Continue reading