If you need to select only one record in a query you can use this examples:
- PostregSQL
SELECT field FROM table WHERE condition = 'abc' LIMIT 1 --(Retrieve 1 row)
- SQL Server
SELECT field FROM table WHERE condition = 'abc' LIMIT 1 --(Retrieve 1 row)
- MySQL
SELECT field FROM table WHERE condition = 'abc' LIMIT 1 --(Retrieve 1 row)
RangeSELECT field FROM table WHERE condition = 'abc' LIMIT 5,10; --(Retrieve 1 rows 6-15)
No comments:
Post a Comment