Remove rand1
article thumbnail

Generate unique random values directly in the database

Derek Sivers

Download the code at /code/rand1.sql. One simple insert of the person_id returns the unique and already-saved random cookie string: insert into cookies (person_id) values (1) returning *; person_id ? cookie. ?????????????????????????????????????????????? 0P8Tp4wjXuTqCCh1NCR9XIom20z9IcYv download code.

40