Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: SQL
Expertise: Intermediate
May 18, 2007

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.

Amit Jain
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap