Hi
I dont know exactly why u need this but this can be done in MySQL/PERL
create a file called random.pl
i select a random reecord from Temp table with PK temp_id
#! /usr/bin/perl -w
use Mysql;
$i = (10*rand())%10;
$dbh = Mysql->Connect('localhost','DBNAME','root');
$sth = $dbh->Query("Se
Greetings, Culley!
At 06.02.2001, 13:11, you wrote:
CH> Any suggestions on how to select a random record from
CH> any given table?
SELECT * FROM any_given_table ORDER BY random() LIMIT 1;
--
Yours, Alexey V. Borzov, Webmaster of RDW
Can this be done in the framework of plpgsql? I know
I can do it in the front end (java) but it would be
nice to aviod having to grab the rowcount first. I
haven't seen a random function in the documentation.
I could install another language but boy am I lazy :)
--- Mark Lane <[EMAIL PROTECTE
Greetings.
I have a smallish sized database that's getting alot of update transactions
to it. It's been running fine over the past several weeks, but suddenly I'm
starting to see :
NOTICE: Deadlock detected -- See the lock(l) manual page for a possible cause.
NOTICE: current transaction is a
Any suggestions on how to select a random record from
any given table?
Culley
__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/