devxlogo

Creating Oracle Table and Column Names that Start with an Underscore

Creating Oracle Table and Column Names that Start with an Underscore

Typically, as part of the product installation, applications/products are required to create some database tables. It’s a good practice to isolate product installation tables from the application/solution specific tables.

One of the best ways to achieve this isolation is to have table and column names start with an underscore “_”. As part of the product installation guide, this allows you to document all such tables as installation tables that should not be touched.

The SQL syntax to create these tables is similar to that of creating any other table?with a slight difference.

Here’s the SQL Syntax to create a table that does not start with an underscore

CREATE TABLE STUDENT (NAME VARCHAR2(20));

Here’s one that does:

CREATE TABLE "_STUDENT" ("_NAME" VARCHAR2(20);

Please note the use of double quotes in the second statement. This is mandatory.

See also  Why ChatGPT Is So Important Today
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist