How can I create a table with an oracle, but with small characters?

How to create a table using oracle, but with small characters, when I create a table with small characters, it converts auto to capital characters.

+6
source share
2 answers

Foldable (non-quoted) uppercase table names are required by the ANSI SQL standard.

You can create tables (and columns) with lowercase names using the quoted identifier (again, this follows the SQL standard):

CREATE TABLE "foo" ( "id" integer, "SomeColumn" varchar(100) ); 

I would strongly recommend that you not do this.

Once you have created your tables this way, you always use double quotes, because any non-command name will (in accordance with the rules for SQL identifiers) be collapsed again in upper case and, therefore, will not match the name, since it is stored in system directories.

To do this, the following statement will not work:

 SELECT id, somecolumn FROM foo; 

You need to use the specified id:

 SELECT "id", "SomeColumn" FROM "foo"; 

Read more about (quoted) identifiers in the manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements008.htm#i27561

+17
source

Enter the table name in quotation marks ( " ). Also create the table as follows

 create table "t" ( a number, b varchar2(10) ); 

Now your table name t is lowercase. You always use quotation marks when accessing your table. for instance

 select * from "t"; 

You can use the same construction for other objects (columns, indexes, ...).

In any case, SQL is case insensitive, you need a good reason to use case-specific object names.

0
source

All Articles