[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
SqlGetOneRow
From http://www.petefreitag.com/item/466.cfm this addition:
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
SqlGetOneRow
(Sql) Get one single rows
See also get one random row.From http://www.petefreitag.com/item/466.cfm this addition:
MySQL
SELECT * FROM database LIMIT 1
PostGreSQL
SELECT column FROM table LIMIT 1
Microsoft SQL Server
SELECT TOP 1 column FROM table
IBM DB2
SELECT column FROM table ORDER BY RAND() FETCH FIRST 1 ROWS ONLY
Oracle
SELECT column FROM table WHERE rownum = 1
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
