How to set table names and columns as case sensiti

2019-09-16 12:54发布

问题:

I have a .NET 4.0 application that uses Entity Framework 4 that connects to a MS SQL 2008 database. The naming convention used is for example table "Clients", fields : "Id", "Id_Order". Now I need to switch from SQL Server to Oracle Server, so I migrated the MS SQL database to oracle database, but the problem is that all the table names and column names are uppercased, so by generating the edmx for oracle(using ODAC), I will have to change in code from "Clients" to "CLIENTS", "Id" to "ID", "Id_Client" to "ID_CLIENT", and it's a lot to change. The migration was done using the built-in migration tool from Oracle SQL Developer 3.1.07.

A snippet from the generated script: CREATE TABLE Clients (

I have read that in order to create case-sensitive identifiers you must use double quotes. So I think the script should be something like this: CREATE TABLE "Clients" (

Does anyone know a migration tool that perserves names case or at least a general option that I can switch on in the script ?

回答1:

Why do you need to change the code? The whole point of Oracle being case-insensitive is that you can refer to the table as clients, Clients, CLIENTS, or even clIeNtS, and it will work.

You only use the double-quotes if you want case-sensitivity for some reason, but unless you have table names that are the same apart from case (shudder), you shouldn't need it.