{"id":76035,"date":"2024-05-12T15:52:52","date_gmt":"2024-05-12T19:52:52","guid":{"rendered":"http:\/\/bangla.sitestree.com\/?p=76035"},"modified":"2024-05-12T15:52:52","modified_gmt":"2024-05-12T19:52:52","slug":"oracle-data-types-rowid-pls_integer-vs-integer","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=76035","title":{"rendered":"Oracle Data types, ROWID, PLS_INTEGER vs INTEGER"},"content":{"rendered":"<p><strong>Data Types<\/strong><\/p>\n<p>Ref: <a href=\"https:\/\/docs.oracle.com\/cd\/A97630_01\/server.920\/a96524\/c13datyp.htm\">https:\/\/docs.oracle.com\/cd\/A97630_01\/server.920\/a96524\/c13datyp.htm<\/a><\/p>\n<p>(Click on the image to see it properly)<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-16.png\" rel=\"attachment wp-att-76036\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-16.png?resize=750%2C750\" alt=\"\" title=\"image-16-png\" width=\"750\" height=\"750\" class=\"alignnone size-full wp-image-76036\" \/><\/a><\/p>\n<p><strong>Why PLS_Integer:<\/strong><\/p>\n<p><a href=\"https:\/\/docs.oracle.com\/cd\/B13789_01\/appdev.101\/b10807\/03_types.htm\">https:\/\/docs.oracle.com\/cd\/B13789_01\/appdev.101\/b10807\/03_types.htm<\/a><\/p>\n<p>\u201cYou use the PLS_INTEGER datatype to store signed integers. Its magnitude range is -2<strong>31 .. 2<\/strong>31. PLS_INTEGER values require less storage than NUMBER values. Also, PLS_INTEGER operations use machine arithmetic, so they are faster than NUMBER and BINARY_INTEGER operations, which use library arithmetic. For efficiency, use PLS_INTEGER for all calculations that fall within its magnitude range.\u201d<\/p>\n<p><strong>ROWID vs ROWNUM<\/strong><\/p>\n<p>ROWID is useful when you need to refer to a specific row in a table without using a primary key or unique constraint. Hence, ROWNUM is a pseudocolumn that assigns a unique row number to each row in a result set, while ROWID is a physical address that identifies a specific row in a table<\/p>\n<p><a href=\"https:\/\/www.c-sharpcorner.com\/interview-question\/what-is-the-difference-between-rownum-and-rowed\">https:\/\/www.c-sharpcorner.com\/interview-question\/what-is-the-difference-between-rownum-and-rowed<\/a><\/p>\n<p><strong>Simple Integer vs PLS_integer<\/strong><\/p>\n<p><a href=\"https:\/\/docs.oracle.com\/en\/database\/oracle\/oracle-database\/19\/lnpls\/plsql-data-types.html\">https:\/\/docs.oracle.com\/en\/database\/oracle\/oracle-database\/19\/lnpls\/plsql-data-types.html<\/a><\/p>\n<p>\u201cSIMPLE_INTEGER has the same range as PLS_INTEGER and has a NOT NULL constraint. It differs significantly from PLS_INTEGER in its overflow semantics. If you know that a variable will never have the value NULL or need overflow checking, declare it as SIMPLE_INTEGER rather than PLS_INTEGER .\u201d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Data Types Ref: https:\/\/docs.oracle.com\/cd\/A97630_01\/server.920\/a96524\/c13datyp.htm (Click on the image to see it properly) Why PLS_Integer: https:\/\/docs.oracle.com\/cd\/B13789_01\/appdev.101\/b10807\/03_types.htm \u201cYou use the PLS_INTEGER datatype to store signed integers. Its magnitude range is -231 .. 231. PLS_INTEGER values require less storage than NUMBER values. Also, PLS_INTEGER operations use machine arithmetic, so they are faster than NUMBER and BINARY_INTEGER operations, which &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=76035\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[182],"tags":[],"class_list":["post-76035","post","type-post","status-publish","format-standard","hentry","category---blog","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":76038,"url":"http:\/\/bangla.sitestree.com\/?p=76038","url_meta":{"origin":76035,"position":0},"title":"Misc. Oracle: Data Types: Why a Data Type.","author":"Sayed","date":"May 12, 2024","format":false,"excerpt":"Ref: https:\/\/docs.oracle.com\/cd\/B13789_01\/appdev.101\/b10807\/02_funds.htm https:\/\/stackoverflow.com\/questions\/7425153\/reason-why-oracle-is-case-sensitive Oracle Data Types and Allowed Sizes: https:\/\/docs.oracle.com\/cd\/E11882_01\/appdev.112\/e25519\/datatypes.htm#LNPLS99943 Oracle SIMPLE_FLOAT vs SIMPLE_DOUBLE Ref: https:\/\/docs.oracle.com\/cd\/B28359_01\/appdev.111\/b28370\/datatypes.htm#CJAEAEJG PLS_Integer vs Number \"The PLS_INTEGER data type has these advantages over the NUMBER data type and NUMBER subtypes: PLS_INTEGER values require less storage. PLS_INTEGER operations use hardware arithmetic, so they are faster than NUMBER\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-19.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-19.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-19.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-19.png?resize=700%2C400 2x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-19.png?resize=1050%2C600 3x"},"classes":[]},{"id":76044,"url":"http:\/\/bangla.sitestree.com\/?p=76044","url_meta":{"origin":76035,"position":1},"title":"Oracle Sub Types for Data Types: Exception Block","author":"Sayed","date":"May 12, 2024","format":false,"excerpt":"An unconstrained subtype has the same set of values as its base type, so it is only another name for the base type. Syntax: SUBTYPE subtype_name IS base_type Example: SUBTYPE \"DOUBLE PRECISION\" IS FLOAT SUBTYPE Balance IS NUMBER; Constrained SubType SUBTYPE Balance IS NUMBER(8,2); Oracle Exception Block Example: Ref: https:\/\/docs.oracle.com\/cd\/B13789_01\/appdev.101\/b10807\/07_errs.htm","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76683,"url":"http:\/\/bangla.sitestree.com\/?p=76683","url_meta":{"origin":76035,"position":2},"title":"Oracle Auditing","author":"Sayed","date":"April 9, 2025","format":false,"excerpt":"To Know: \u2022WHAT IT IS? \u2022WHY WE NEED \u2022WHAT CAN WE AUDIT \u2022WHAT ORACLE AUDITS ON Its OWN \u2022WHERE AUDIT DATA ARE KEPT \u2022HOW TO SET CUSTOM AUDIT \u2022HOW TO SEE WHAT AUDITS ARE SET \u2022HOW TO SEE THE AUDIT TRAIL Check: https:\/\/docs.oracle.com\/cd\/E11882_01\/server.112\/e10575\/tdpsg_auditing.htm#TDPSG50511 Activity: Using Audit Trail Views to Investigate\u2026","rel":"","context":"In &quot;Root&quot;","block_context":{"text":"Root","link":"http:\/\/bangla.sitestree.com\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76047,"url":"http:\/\/bangla.sitestree.com\/?p=76047","url_meta":{"origin":76035,"position":3},"title":"Oracle PL\/SQL: If-Then-Else, For Loop, While Loop","author":"Sayed","date":"May 12, 2024","format":false,"excerpt":"How it works: if, elsif, else (then) (Click on the images to see them clearly) Ref: https:\/\/docs.oracle.com\/cd\/B13789_01\/appdev.101\/b10807\/13_elems024.htm Example: Ref: https:\/\/docs.oracle.com\/cd\/B13789_01\/appdev.101\/b10807\/13_elems024.htm Oracle: CASE, WHEN, THEN Simple: Searched: '' Else: Reverse For Loop Ref: For Loop Examples in Oracle https:\/\/docs.oracle.com\/cd\/E11882_01\/appdev.112\/e25519\/controlstatements.htm#BABEFFDC Oracle While Loop While loop example from the referenced url DECLARE done\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-28.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-28.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-28.png?resize=525%2C300 1.5x"},"classes":[]},{"id":75826,"url":"http:\/\/bangla.sitestree.com\/?p=75826","url_meta":{"origin":76035,"position":4},"title":"Some Topics to Know and Understand to prepare for a DBMS related Job Interview","author":"Sayed","date":"June 25, 2023","format":false,"excerpt":"Some Topics to Know and Understand to prepare for a DBMS related Job Interview ACID ACID: https:\/\/www.geeksforgeeks.org\/acid-properties-in-dbms Database Normalization 1NF: No repeating groups possible for a cell, PK identified, dependencies mapped 2NF: No Partial Dependence. Non key attributes must have to depend on the full key 3NF: No transitive dependency.\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":65691,"url":"http:\/\/bangla.sitestree.com\/?p=65691","url_meta":{"origin":76035,"position":5},"title":"Take Two values from the user and do arithmetic operations #Linux\/Unix: Shell Programming &#8211; 001","author":"Author-Check- Article-or-Video","date":"July 11, 2021","format":false,"excerpt":"#!\/usr\/bin\/bash clear echo \"Enter First Number\" read x echo \"Enter Second Number\" read y #does not work for \/bin\/sh (( z = $x + $y )) (( a = $x - $y )) (( b = $x * $y )) (( c = $x \/ $y )) #clear echo \"Addition\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76035","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=76035"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76035\/revisions"}],"predecessor-version":[{"id":76037,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76035\/revisions\/76037"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=76035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=76035"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=76035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}