Sajeev
Sajeev

Reputation: 799

To make entire column names in lower case in oracle

I am using oracle xe,while creating columns it is created in upper case.Is there any rule to make the entire database columns in lower case.

Upvotes: 2

Views: 13543

Answers (3)

КЕМ
КЕМ

Reputation: 1

It's fine to use double quotes is SQL.

SELECT  'abc' as "Abc" from dual;

Upvotes: 0

Paul Maxwell
Paul Maxwell

Reputation: 35603

To answer to your specific question: No (you cannot globally change all column headings to lowercase)

Nonquoted Identifiers: Unless you use quotes when creating objects the default for storage is upper case and these are called nonquoted identifiers in documentation. This allows "case insensitive" use of those names. e.g. a field stored with the name DESCRIPTION can be used in lowercase or mixed case like dEscRipTion

Quoted Identifiers If however you use "quoted identifiers" then you create case sensitive names and all references to them must be a precise match. So a field with the stored name of DesCripTion must always be used with exactly that mixed case and DescripTion would not work.

In short, don't mess with the defaults, you are way better off leaving them as "nonquoted identifiers"

see: Schema Object Naming Rules

Upvotes: 4

Hugo R
Hugo R

Reputation: 3113

use oracle "rename" syntax. for example:

//  existing column on TABLE1 is CITY_NAME 
// new name is  cityName
// you can rename table and/or columns
rename table SCHEMA1.TABLE1 to "NewTableName"

and

rename column SCHEMA1.TABLE1.CITY_NAME to "cityName"

the main thing to remember is to enclose the new name in quotes. you have to modify your exiting views and cursors because they will break.

Upvotes: 1

Related Questions