Home / Companies / Bandwidth / Blog / Post Details
Content Deep Dive

Attaining reusability in SQL server: part II

Blog post from Bandwidth

Post Details
Company
Date Published
Author
Dan Goslen
Word Count
684
Company Posts That Month
1
Language
English
Hacker News Points
-
Post removed?
No
Summary

The text discusses the implementation of User-Defined Table Types (UDTTs) and Table-Valued Functions (TVFs) in stored procedures for basic statistics gathering. It presents a scenario where an order database needs to provide a dashboard with metrics per order type, which can be achieved by storing smaller snapshots of statistics in another table called `order_stats`. The implementation involves creating TVFs and UDTTs, including the `tvf_gather_anayltics` function that accepts a temporary table of the UDTT type `udtt_order_stats`. A full example is provided with scripts to set up the database and create all necessary objects.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.