You can place individual tables in read-only mode. Doing so prevents any INSERT, UPDATE, or DELETE statements from running against a table. An alternate way to do this is to make the tablespace read-only and use this tablespace for the tables that are static for read-only.There are several reasons why you may require the read-only […]
A virtual column is based on one or more existing columns from the same table or a combination of constants, SQL functions, and user-defined PL/SQL functions or both. Virtual columns are not stored on disk; they are evaluated at runtime, when the SQL query executes. Virtual columns can be indexed and have stored statistics. Note […]
When capturing and reporting on date-related information, you should always use a DATE or TIMESTAMP data type and not VARCHAR2. Using the correct date-related data type allows you to perform accurate Oracle date calculations and aggregations and dependable sorting for reporting. If you use a VARCHAR2 for a field that contains date information, you are […]
To create a heap-organized table, you use the CREATE TABLE statement and data types and lengths associated with the columns. The Oracle default table type is heap organized. The term heap means that the data are not stored in a specific order in the table; instead, they are a heap of data. If you do […]
When DBAs hear the word ROWID (row identifier), they often think of a pseudocolumn provided with every table row that contains the physical location of the row on disk; that is correct. However, many DBAs do not realize that Oracle supports an actual ROWID data type, meaning that you can create a table with a […]
When capturing and reporting on date-related information, you should always use a DATE or TIMESTAMP data type and not VARCHAR2. Using the correct date-related data type allows you to perform accurate Oracle date calculations and aggregations and dependable sorting for reporting. If you use a VARCHAR2 for a field that contains date information, you are […]
The NVARCHAR2 and NCHAR data types are useful if you have a database that was originally created with a single-byte, fixed-width character set, but sometime later you need to store multibyte character set data in the same database. You can use the NVARCHAR2 and NCHAR data types to support this requirement.When the database is created […]
Use a character data type to store characters and string data. The following character data types are available in Oracle:• VARCHAR2• CHAR• NVARCHAR2 and NCHAR VARCHAR The VARCHAR2 data type is what you should use in most scenarios to hold character/ string data. A VARCHAR2 allocates space based only on the number or characters in […]
The Oracle database supports a vast and robust variety of table types. These various types are described in Table 7-1. Table 7-1. Oracle Table Type Descriptions This chapter focuses on the table types that are most often used: heap organized, index organized, and temporary tables. Partitioned tables are used extensively in data warehouse environments and […]
New with 23c, you can now grant a schema to a user. This means all of the objects in the schema will be granted. This simplifies if new objects are added or modified, grants are based on a schema. New tables will be accessible without specifically granting access to that table. It is still recommended […]