jump to navigation

Scalar Functions August 11, 2005

Posted by Coolguy in Databases.
trackback
  • Many database drivers allow you to call functions within SQL statements
  • These functions typically perform numeric calculations, string manipulation, date/time manipulation, and the retrieval of system information.
  • Because the names and syntax of these functions are often different across data sources, ODBC defines a set of data source-independent scalar functions
  • The syntax for calling ODBC scalar functions is as flows: { fn scalar-function }
  • The first example illustrates calling CURDATE to obtain the current date: SELECT * FROM Orders WHERE ShipDate>={ fn CURDATE() }
Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: