Sunday, April 18, 2010

FIRST() Function

0 comments
The FIRST() function returns the first value of the selected column.
In MYSQL
SQL FIRST() Syntax
SELECT FIRST(column_name)
FROM table_name
Example
SELECT OrderPrice
FROM Orders ORDER BY O_Id
LIMIT 1
 In SQL Server
Syntax
SELECT FIRST(column_name)
FROM table_name
In SQL SERVER
Example:
SELECT top 1 OrderPrice
FROM Orders ORDER BY O_Id

0 comments: