>Ok if I understand you, besides the language example that Dorris showed, you can write a stored procedure in another language (e.g. C# as you mentioned below) and then somehow "attach" this to the database and so when you call the function, the database is able to run the C# routine and return some value or table etc. Do I understand this correctly?
>
>Thanks,
>Albert
Yes you understood it right. .Net is supported by MS SQL Server. You can write SP, TVF, UDF, UDT (fancy abbreviations for Stored Procedure, Table Valued Function, ...). They are written as DLLs and then with a couple of T-SQL commands registered with the database (embedded in the database, you can move the DLL away after registering). Then it becomes part of it. For example, MS SQL Server, have getdate() for datetime(). You could write it in C# and then you would have DateTime() as if it is a built-in T-SQL function.
postgreSQL have this power on streoids, allowing you to use multiple languages for doing that (needles to say again, its own SQL is more powerful than MS SQL's T-SQL IMHO).