Microsoft.Data.Sqlite 2.1 منتشر شد
نویسنده: وحید نصیری
تاریخ: ۱۳۹۷/۰۳/۱۰ ۸:۴۲
آدرس: www.dntips.ir
| مطالب | ۳۶۹۴ |
| نویسندگان | ۲۷۶ |
| گروههای مطالب | ۱۰۲۴ |
| نقشههای راه | ۱۱۹ |
| دورهها | ۱۴ |
| اشتراکها | ۱۷۹۱۴ |
// User-defined functions
connection.CreateFunction(
"volume",
(double radius, double height)
=> Math.PI * Math.Pow(radius, 2) * height);
// And use the function in SQL to find the biggest cylinder.
SELECT id, volume(radius, height) AS volume
FROM cylinder
ORDER BY volume DESC
LIMIT 1