7

Is there a command which I can run to do nothing (or very little) which will never error?

I need something for testing porpoises.

Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551

2 Answers2

8

A comment does nothing (but your database driver might complain if there is not command at all):

/* Hello, world! */

Unknown PRAGMA statements are ignored, and do not return anything:

PRAGMA testing_porpoises;

If you need a statement that returns an empty result set, you need a SELECT:

SELECT 0 WHERE 0;
CL.
  • 173,858
  • 17
  • 217
  • 259
5

For example a simple constant select could do:

SELECT 1 WHERE 0;
laalto
  • 150,114
  • 66
  • 286
  • 303