tags:

views:

43

answers:

1

Can you create functions in SQLite like you can in MSSQL?

If so, how? What is the syntax?

Thanks

+2  A: 

SQLite does not have a stored function/stored procedure language. So CREATE FUNCTION does not work. What you can do though is map functions from a c library to SQL functions (user-defined functions). To do that, use the C++ API (see: http://www.sqlite.org/c3ref/create_function.html)

If you're not using the C++ API, your wrapper API may define something that allows y9ou access to this feature, see for example PHP's sqlite_create_function() (http://www.php.net/manual/en/function.sqlite-create-function.php)

Roland Bouman