Native Dynamic SQL is easier to use than DBMS SQL.
[nz_btn text="Software Resiliency" link="http://casthighlight.wpengine.com/category/product/indicators-methodology/code-insights/software-resiliency/" target="_self" animate="false" animation_type="ghost" color="pink" size="small" shape="rounded" type="normal" hover_normal="fill" hover_ghost="fill"][nz_btn text="Programming Best Practices" link="http://casthighlight.wpengine.com/category/product/indicators-methodology/code-insights/software-resiliency/programming-best-practices/" target="_self" animate="false" animation_type="ghost" color="black" size="small" shape="rounded" type="ghost" hover_normal="fill" hover_ghost="fill"]This code insight shows that PL/SQL provides two ways to write dynamic SQL:- Native dynamic SQL, a PL/SQL language (that is, native) feature for building and executing dynamic SQL statements DBMS_SQL package, an API for building, executing, and describing dynamic SQL statements
- Native dynamic SQL code is easier to read and write than equivalent code that uses the DBMS_SQL package, and runs noticeably faster (especially when it can be optimized by the compiler).
Why you should care
DBMS - Database Management System is a computer software application that interacts with other applications, and the database to capture and analyze data. SQL is a base that is used with most Database systems like Oracle, Microsoft SQL server and so forth. Dynamic SQL is a technique to build SQL statements dynamically at runtime. Running Native Dynamic SQL over the DBMS SQL is much easier as Native Dynamic SQL is integrated with SQL and can be used similarly to static SQL. DBMS dynamic SQL is not as easy as many procedures have to be used in a strict sequence and require a lot of code which can be time consuming and prone to errors. References: https://docs.oracle.com/cd/A87860_01/doc/appdev.817/a76939/adg09dyn.htmAbout CAST and Highlight's Code Insights
Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.[nz_btn text="How it works" link="http://casthighlight.wpengine.com/how-it-works/" target="_self" animate="true" animation_type="ghost" color="black" size="small" shape="rounded" type="normal" hover_normal="fill" hover_ghost="fill" icon="icon-cog"][nz_btn text="Features & Analytics" link="http://casthighlight.wpengine.com/outputs-analytics/" target="_self" animate="true" animation_type="ghost" color="pink" size="small" shape="rounded" type="ghost" hover_normal="fill" hover_ghost="fill" icon="icon-stats"]
For reference only. For the complete details please refer the original article
https://doc.casthighlight.com/alt_dbmswarning-avoid-using-dbms-dynamic-sql/
https://doc.casthighlight.com/alt_dbmswarning-avoid-using-dbms-dynamic-sql/
Comments