1. Stored Procedure

A stored procedure is a precompiled collection of SQL statements (and sometimes control logic) stored in the database. It’s like a function that can be called whenever needed. It can accept parameters such as input and output, and is also often used for complex logic, such as loops.

  1. CTE (Common Table Expression) A CTE is a temporary named result set you can use within a single query. Think of it as a short-term, readable alias for a subquery. It exists only during query execution. CTE’s make complex queries easier to read and maintain.

  2. Subquery A subquery is a query nested inside another query; in other words, it is like a query within a query. It can appear within the SELECT, FROM, or WHERE clause, and it executes each time the main query is run.

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help