| Tags: Java, user defined, functions, Sybase, |
|
Java and SQL user-defined functions in Sybase ASE
|
|
02-02-2010, 02:26 AM
Post: #1
|
|||
|
|||
|
Java and SQL user-defined functions in Sybase ASE
There are two mechanisms for creating user-defined functions in Adaptive Server IQ. You can use the SQL language to write the function, or you can use Java.
User-defined functions are processed by the Adaptive Server Anywhere portion of the product. They do not take advantage of the performance features of Adaptive Server IQ. Queries that include user-defined functions will run at least 10 times slower than queries without them. In very few cases, differences in semantics between ASA and ASIQ can produce different results for a query if it is issued in a user-defined function. For example, IQ treats the CHAR and VARCHAR data types as distinct and different, while Anywhere treats CHAR data as if it were VARCHAR. User-defined functions in SQL You can implement your own functions in SQL using the CREATE FUNCTION statement. The RETURN statement inside the CREATE FUNCTION statement determines the data type of the function. Once a SQL user-defined function is created, it can be used anywhere a built-in function of the same data type is used. User-defined functions in Java Although SQL functions are useful, Java classes provide a more powerful and flexible way of implementing user-defined functions, with the additional advantage that they can be moved from the database server to a client application if desired. Any class method of an installed Java class can be used as a user-defined function anywhere a built-in function of the same data type is used. Instance methods are tied to particular instances of a class, and so have different behavior from standard user-defined functions. Ref: Sybase Inc |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| Getting Row Counts in User Tables in Sybase ASE | Nagendra | 0 | 147 |
11-28-2009 07:25 PM Last Post: Nagendra |
|
| ltrim and rtrim functions in sybase | Joshi | 0 | 205 |
09-09-2009 01:51 AM Last Post: Joshi |
|
| sybase string functions with examples | john | 0 | 187 |
07-07-2009 02:30 AM Last Post: john |
|
| Sybase User defined SQL functions | zaadmin | 0 | 206 |
11-10-2008 11:19 PM Last Post: zaadmin |
|
| TRANSACT-SQL Wiki and User Guide Web Link | sybaseteam | 0 | 255 |
06-04-2008 10:35 PM Last Post: sybaseteam |
|

Chat Support
Search
Disclamier & Rules
Help


