content_image/724818.jpg content_image/724835.jpg content_image/724824.jpg content_image/724825.jpg content_image/724826.jpg content_image/724827.jpg content_image/724828.jpg
Example: 

mysql> SELECT gen_rnd_email(); 

<img src='content_image/724818.jpg'>

• gen_rnd_pan([ size ]) 

Generates a random payment card Primary Account Number. The number passes the Luhn check (an algorithm that performs a checksum verification against a check digit). 

<img src='content_image/724835.jpg'>

Arguments: 

## Warning 

Values returned from gen_rnd_pan()  should be used only for test purposes, and are not suitable for publication. There is no way to guarantee that a given return value is not assigned to a legitimate payment account. Should it be necessary to publish a gen_rnd_pan()  result, consider masking it with mask_pan()  or mask_pan_relaxed() . 

• size : (Optional) An integer that specifies the size of the result. The default is 16 if size  is not given. If given, size  must be an integer in the range from 12 to 19. 

Return value: 

A random payment number as a string, or NULL  if a size  argument outside the permitted range is given. 

Example: 

mysql> SELECT mask_pan(gen_rnd_pan()); 

<img src='content_image/724824.jpg'>

mysql> SELECT mask_pan(gen_rnd_pan(19)); 

<img src='content_image/724825.jpg'>

mysql> SELECT mask_pan_relaxed(gen_rnd_pan()); 

<img src='content_image/724826.jpg'>

SELECT mask_pan_relaxed(gen_rnd_pan(19)); 

<img src='content_image/724827.jpg'>

SELECT gen_rnd_pan(11), gen_rnd_pan(20); 

<img src='content_image/724828.jpg'>

