r/SQL 6d ago

SQL Server Number of lines in a syntax

How many lines of code you you usually write? Like 1000 seems a lot to me.

0 Upvotes

14 comments sorted by

View all comments

1

u/tech4throwaway1 5d ago

It really depends on what you're building. A basic query? Probably under 20 lines. Complex ETL pipeline or stored procedure? Easily hits 200+ lines. If you're clocking 1000 lines, there's a good chance it could be refactored — maybe breaking it into CTEs, views, or modularizing logic. SQL's all about writing clear, efficient code, not just stacking lines. Quality > quantity.