Usefull notes for dev
1 subscriber
5 files
10 links
Download Telegram
Do you use views in sql?
Herę several reasons why you should try them:


VIEWS can be used as reusable sections of SELECT/CODE, that can be included in other selects/queries to be joined on, and use various different filters, without having to recreate the entire SELECT every time.
Simplicity - Views can be used to hide complex queries.
Security - View can hide some important information from end user by creating view on some selected columns
Security - Secure table to change the structure of it by using VIEW.
Redundancy - Reduce redundant code in every procedures/query by using a common view.
Calculation - All the calculations can be done once in view query.
Meaningful Name - Table may have name for id like tbl_org_emp_id which can alias like [Employee No] or some meaningful name.

Vendor: https://stackoverflow.com/questions/2680207/what-is-a-good-reason-to-use-sql-views