Thomas Chust,您好!
the mail num is so many,
how can cancel the maillist.
=== 2006-04-16 16:03:00 您在来信中写道:===
>On Sun, 16 Apr 2006, [EMAIL PROTECTED] wrote:
>
>> Thomas Chust <[EMAIL PROTECTED]> wrote:
>>> Hello,
>>>
>>> I have a table of strings and integer primary keys from
On Sun, 16 Apr 2006, [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] writes:
[...]
I cannot think of a more efficient way to do this if you
require each output to have equal probability. If you do
not need each string to have exactly the same probability,
however, you could do this:
SELECT
On Sun, 16 Apr 2006, [EMAIL PROTECTED] wrote:
Thomas Chust <[EMAIL PROTECTED]> wrote:
Hello,
I have a table of strings and integer primary keys from which I would like
to retrieve a string at random. [...]
I cannot think of a more efficient way to do this if you
require each output to have
Thomas Chust <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have a table of strings and integer primary keys from which I would like
> to retrieve a string at random. The best solution I could think of was to
> first do a
> SELECT count(id) FROM strings;
> and then a
> SELECT string FROM
Hello,
I have a table of strings and integer primary keys from which I would like
to retrieve a string at random. The best solution I could think of was to
first do a
SELECT count(id) FROM strings;
and then a
SELECT string FROM strings LIMIT 1 OFFSET ?;
where the parameter is set to an
5 matches
Mail list logo