Any method to drop extra column in oracle 8

hello
I am using oracle 8
i want to remove extra column from my table
please help me
regards
pritam

Drop column is available only after Oracle 8. The only thing I can think of is to re-create the table without the extra column
create table <newtablename > as
select col1, col2.... from <tablename>
But then you will have to recreate the constraints on the new table. ( only the not null constraint will be copied to it)

Similar Messages

  • Is there any method to export the data from oracle 10g in any format !!!!!

    is there any methods to export the data from oracle 10g in the format of excel or csc or txt or anyother. i already downloaded the sql developer tool but it only exports the data of upto one lakh rows ,but i have two tables of more than 3 lakh and 10 lakh rows respectively.for this i used 'where' command to break the file through sql developer but that didnt work
    plz help me out if any thing possible
    i need to again import this data into microsoft sql if there is any direct method plz let me know
    its urgent
    Message was edited by:
    user628031
    Message was edited by:
    user628031

    Take a look at DUMP_CSV function by Tom Kyte.

  • How to drop a column in Oracle 7i

    I tried
    "alter table tablename drop column columnname" in Oracle 7i, it is not working.
    Column is nullable
    Could anyone pls help me on this?

    any luck finding the v6 doc online?
    RENAME emp to emp_orig;
    CREATE VIEW EMP as
    select col1, col2... --LEAVE OFF THE COLUMN YOU WANT TO DROP
    from emp_orig;
    GRANT select, insert, update, delete on EMP to ....
    this way, you don't have to drop anything, recreate indexes, deal with downtime, etc.
    better solution, just tell people to ignore the other column. really, what harm can it do?

  • Deleting an extra column in the resultset of genericsearch page

    Hello E-Commerce Experts,
    we have a requirement where we need to delete a column in the resultset of the quicksearch trasactions in the genericsearch page.
    In order to hide this column we placed a condition in the action class from where we are getting the contents in the column.
    Now, we are unable to see the contents in the column but we are getting an empty column.
    As the genericsearch page gets genereted dynamically,we are unable to place any condition on that extra column.
    Can anyone suggest how to prevent this column from appearing on the screen. Do we need to set any parameters or anything.
    Thanks and regards,
    venkatesh Saini.

    Hi Venkatesh,
    You do not need to modify Action class for just hiding Trash column.
    Put below lines of code as I have suggested in *genericsearch.jsp* file you will able to hide *Trash* column without modifying Action class.
    You need to do 2 things to achieve your goal.
    First remove Header cell for Trash column and then remove trash icon cell from each row.
    First Search *<%-- // +++++++++++++++ RESULT LIST START +++++++++++++ --%>* comment.
    1) First Hide cell from Header Row.
    <% if ( ! "hidden".equals(listheader.getType())) { %>
         <% if ( listheader.getWriteUnderProperty() == null  ||  listheader.getWriteUnderProperty().length() <= 0  || baseui.isAccessible) { %>
              <% if ( ! firstPty) { %>
                 </th>
              <% }
                  firstPty = false;
              %>
         <%  //Custom Line
              if (!(ui.writeResultListHeader(listheader) == "" || ui.writeResultListHeader(listheader) == null)){  //Custom line
         %>  //custom Line
          <th scope="col" <%=ui.getTabIndex(true)%>>
                   <%=ui.writeResultListHeader(listheader)%>
         <% }%>     //Custom Line
    <% } else { %>
         <br /><%=ui.writeResultListHeader(listheader)%>
    <% } %>
    <% } %>
    2) Now Remove Trash cell from row. Below code with close <TD> tag properly
    <% if ( (! isWriteUnderProperty)) { %>
       <% if((iconPath == null) || (iconPath == "")){%> // Custom line
         <td <%=ui.writeResultTitlePerTD(rowfields)%> <%=ui.getTabIndex(true)%> <%=(iconPath !=null && iconPath.length() > 0 ? "style=\"text-align: center\"": "")%>>
      <% } else {%> // Custom Line
          </td>
      <%}%> //Custom Line
    <% } else { %>
          <br />
    <% } %>
    3) Now hide Cell with Trash icon.
    <% if (iconPath != null && iconPath.length() > 0) { %>
      <% if((iconPath == null) || (iconPath == "")){%> //Custom Line 
    < imge src="<%=iconPath%>"  alt="<%=outField.getString("ICONTITLE")%>"  border="<%=outField.getString("ICONBORDER")%>" width="<%=outField.getString("ICONWIDTH")%>" height="<%=outField.getString("ICONHIGHT")%>" />
      <% } %> //Custom Line
    <% } else { %>
         <%=ui.writeResultlistValue(rowfields , fieldValue)%>
    <% } %>
    I have written //Custom Line where I have added it in standard code.
    I have tested on my local and working fine.
    Let me know if you face any problem.
    eCommerce Developer

  • How to drop a column

    Hi OTNeites,
    How does one drop a column in Oracle 7.2 or Oracle 8.0
    Thanks in advance.

    Something like this.
    create new_table as select col1, col2, col3
    from old_table
    drop old_table
    rename new_table to old table
    The trick is to select all the columns except the one you want to drop when creating the new table.
    In this case you lost all indexes, constraints ...
    You should create script for recriate all objects in DB
    that will be drop with DROP OLD_TABLE command.

  • Hi I'm a total novice, as you will see. But Iam trying to use template of an employee schedule but when I try to add extra columns it does not add the preset formula with it, so it works out total hours and total pay?   If any one can help please.

    Hi I'm a total novice, as you will see. But Iam trying to use template of an employee schedule but when I try to add extra columns it does not add the preset formula with it, so it works out total hours and total pay?   If any one can help please before I throw it through the window!

    Grum12 wrote:
    Hi I'm a total novice, as you will see. But Iam trying to use template of an employee schedule but when I try to add extra columns it does not add the preset formula with it, so it works out total hours and total pay?   If any one can help please before I throw it through the window!
    Hi Grum,
    If the formulas aren't filling to the new column, you must have changed something in the template since you first opened it. Numbers is rather fussy about filling row content in columns as they are added. Only rows with the same expression in every Body Column will fill when a column is added. Just as an experiment, start a new Employee Schedule document from the Template Chooser and then add a column by clicking the Add Column handle in the upper right corner of the table. If that works, as it should, then think about what might have changed in your working document to disconnect that feature. Maybe we can figure it out together.
    Jerry

  • Any method to Import the data from Ingres Database to Oracle Database

    Hi,
    Is there any method to import the datas from Ingres Database to Oracle Database,
    Thanks in Advance.

    Check out this link.
    HTH...

  • Extra columns in ALV report

    Hi there,
    I added a column to an existing alv report which uses method 'set_table_for_first_display' to display the output.
    The method is called via:
    grid1              TYPE REF TO cl_gui_alv_grid,
        CALL METHOD grid1->set_table_for_first_display
              EXPORTING
                        i_structure_name     = 'MAT_DATA'
                        is_layout            = lt_layout
                        is_variant           = lt_variant
                        i_default            = lt_default
                        i_save               = 'A'
                        it_toolbar_excluding = lt_exclude[]
               CHANGING it_outtab            = mat_data[]
                        it_fieldcatalog      = w_fieldcat[]
             EXCEPTIONS
                        program_error        = 1.
    The extra columns are in the field catalog and mat_data.
    The lt_variant-report field has the report name in it.
    When I run the report the new column does NOT appear.
    I cleared out the lt_variant-report value and now the new column DOES appear.
    Any idea why this is happening?
    Is there some way I can leave the report name in there and see the new columns?
    Thanks.

    thanks.
    no_out is initial.
    But, in this case, I am not passing any variant.
    It works if I don't pass the report name in the
    is_variant-report
    field.The columns will not display if I pass the report name.

  • R12 Payment Process Request Status Report adding extra columns to XML data.

    In 11i, we had modified the Preliminary Payment Report to include extra columns ( invoice distributions). In r12 , that report is obsolete and Oracle introduced a new report "Payment Process Request Status Report". This request uses BI Publisher to generate the final report output. I am unable to modify the template since the XML output of the report does not
    contain the invoice distribution account data. We need to know how can we modify the XML data to include the extra columns.
    For Funds Disbursement Process ( Payment Instruction File) , Oracle provides IBY_FD_EXTRACT_EXT_PUB extensibility package to construct custom XML element structure that can be added to the payment XML extract generated by Oracle Payments. Do we have something similar for this report ? Are there any other options available ?
    Thanks

    Hi
    The same package "IBY_FD_EXTRACT_EXT_PUB" works for payment process request status report also. Please add the logic to get the distribution data in this package and you will see the new XML tags in this report also.
    Hope this helps.
    Vinit

  • Rename column in Oracle 9i

    Can we rename column in Oracle 9i?
    Thanks,
    Alex

    I don't think it should be that complicated unless you have any contraints to it. Do you have any foreign keys that are referencing to this particular table ? Also let me know what syntax are you using for dropping the column ?
    Also look at the following example, try these things on some test/dummt table first.
    Dropping a Column: Example
    ===========================
    This statement illustrates the drop_column_clause with CASCADE CONSTRAINTS. Assume table t1 is created as follows:
    CREATE TABLE t1 (
    pk NUMBER PRIMARY KEY,
    fk NUMBER,
    c1 NUMBER,
    c2 NUMBER,
    CONSTRAINT ri FOREIGN KEY (fk) REFERENCES t1,
    CONSTRAINT ck1 CHECK (pk > 0 and c1 > 0),
    CONSTRAINT ck2 CHECK (c2 > 0)
    An error will be returned for the following statements:
    /* The next two statements return errors:
    ALTER TABLE t1 DROP (pk); -- pk is a parent key
    ALTER TABLE t1 DROP (c1); -- c1 is referenced by multicolumn
    -- constraint ck1
    Submitting the following statement drops column pk, the primary key constraint, the foreign key constraint, ri, and the check constraint, ck1:
    ALTER TABLE t1 DROP (pk) CASCADE CONSTRAINTS;
    If all columns referenced by the constraints defined on the dropped columns are also dropped, then CASCADE CONSTRAINTS is not required. For example, assuming that no other referential constraints from other tables refer to column pk, then it is valid to submit the following statement without the CASCADE CONSTRAINTS clause:
    ALTER TABLE t1 DROP (pk, fk, c1);
    Shalu

  • Using SAP Tokens & showing extra columns to choose

    I have a Crystal Report where I have a SAP token parameter to select a budget scenario to run the report based on.
    My token is selecting the 3 columns I need to display inorder to select the correct scenario - AbsID, Name & FinancYear.
    Budget@Select AbsID, Name,FinancYear  from OBGS order by 3
    When I preview in SAP my drop down box only gives me AbsID and name - which is of course a list diplaying "Main Budget" repeated for the number of financial year I have in the database.
    As these Main Budgets can (and have) been created in any order, it is impossible toexpect the users to select the correct budget from the displayed data.
    As there is no direct join from OBGS to OFPR on financial year, I can't work out how to either display the additional column in the choose from list, or filter my selection statement so it will only give scenarios that relate to the financial year for the period I have selected
    Any sensible suggestions welomed!

    Hi Julie,
    Remember that combo box controls in SAP can only display two values, a code and description, or in the case of report tokens the first two columns you specify in the token query. Seeing as you need the third column to distinguish between the first two sets of values a combo box is no use to you on it's own.
    The following is off the top of my head and untested but what about either replacing the combo box with a CFL that shows as many columns as you need (and by nice coincidence the first column in that table is the value you want selected, AbsID), OR, created two report parameters the first displays the Financial Year and the second displays the AbsID and Name values for the selected FinYr?
    Remember I'm writing this free hand so you'll need to test to make sure it's ok.
    Replace Cbo with CFL
    Budget@Select * From OBGS order by 3
    This should display a CFL where you can add any extra columns needed from the form settings.
    Two Cbo Parameters
    FinYr@ SELECT F_RefDate FROM OFPR
    Budget@Select AbsID, Name from OBGS WHERE FinancYear = ('FinYr@') order by 3
    So you can reference one parameter name inside another to limit the results displayed by the second parameter.
    One of the above or some variation should get you what you need.
    Regards,
    Andrew.

  • What is this extra column?

    Hello I got a curious column in a table. It's Enterprise Oracle 10.2.0.3 on AIX. I found it when I used datapump to copy a schema from one db to another. Found it created this 'extra' column. I looked at the source db and found this:
    1 select name, property, segcol#, col#
    2 from sys.col$
    3 where obj# = 374103
    4* order by col#
    SQL> /
    NAME PROPERTY SEGCOL# COL#
    SYS_C00098_10072711:34:19$ 1081376 98 0
    REGISTERID 0 1 1
    RECORDTYPE 0 2 2
    COMPCD 0 3 3
    DIVCD 0 4 4
    STORECD 0 5 5
    REGFILEIND 0 6 6
    SHIPTOGEOCODE 0 7 7
    SQL> desc "VERTEX"."REGPRERETURNSTBL"
    Name Null? Type
    REGISTERID VARCHAR2(25)
    RECORDTYPE NUMBER(3)
    COMPCD VARCHAR2(5)
    DIVCD VARCHAR2(5)
    STORECD VARCHAR2(10)
    REGFILEIND NUMBER(38)
    SHIPTOGEOCODE NUMBER(9)
    1 select dbms_metadata.get_ddl('TABLE', 'REGPRERETURNSTBL', 'VERTEX')
    2* from dual
    SQL> /
    DBMS_METADATA.GET_DDL('TABLE','REGPRERETURNSTBL','VERTEX')
    CREATE TABLE "VERTEX"."REGPRERETURNSTBL"
    ( "SYS_C00098_10072711:34:19$" VARCHAR2(255),
    "REGISTERID" VARCHAR2(25),
    "RECORDTYPE" NUMBER(3,0),
    "COMPCD" VARCHAR2(5),
    "DIVCD" VARCHAR2(5),
    "STORECD" VARCHAR2(10),
    "REGFILEIND" NUMBER(*,0),
    "SHIPTOGEOCODE" NUMBER(9,0),
    I could just re-create the table, but curious if anyone know what that column is and possibly how it got there. Anyone know what property 1081376 means?
    TIA

    The name of the column make me think about a unused column. Try to drop unused columns as following :
    SQL> create table mytable (c1 number, c2 number);
    Table created.
    SQL> select object_id from user_objects where object_name='MYTABLE';
    OBJECT_ID
        171709
    SQL> select name, property, segcol#, col# from sys.col$ where obj#=171709;
    NAME                             PROPERTY    SEGCOL#       COL#
    C1                                      0          1          1
    C2                                      0          2          2
    SQL> alter table mytable set unused(c1);
    Table altered.
    SQL> select name, property, segcol#, col# from sys.col$ where obj#=171709;
    NAME                             PROPERTY    SEGCOL#       COL#
    SYS_C00001_11012817:30:41$          32800          1          0
    C2                                      0          2          1
    SQL> alter table mytable drop unused columns;
    Table altered.
    SQL> select name, property, segcol#, col# from sys.col$ where obj#=171709;
    NAME                             PROPERTY    SEGCOL#       COL#
    C2                                      0          1          1However, regarding DBMS_METADATA.GET_DDL, I cannot reproduce your case (I have no 10.2.0.3 db, only 10.2.0.4), it could be a bug on your patchset level.
    Nicolas.

  • Extra column in Crosstab report

    Hi Experts,
    We are designing a cross tab report (using CR 2008) and got stuck at one point. If we want to add an extra column in cross tab, what is the way to insert the same?
    Currently our cross tab is designed using 3 elements: Country, Month and Sales. We would like to add an extra column u201Clast year salesu201D before Month data. This element is present in database.
    Any help / suggestions would be appreciated.
    Regards,
    Chinmay

    Right click Cross tab - -> Cross tab expert
    Drag field into columns and the position with up/down arrows
    Ian

  • Confirming method to secure web services through oracle web service manager

    Hi All,
    I am just wondering about the method to secure web service through oracle web service manager.
    I have a unsecure web service "helloworld" which is deployed on JWSDP1.6 toolkit.I want to secure it through oracle web service manager.
    Inorder to secure this unsecure web service,I use gateway(web service manager for securing web service using message level security through certificate).
    So when client want to access the helloworld service,it contacts the gateway securely and gateway intern connect to original web service after decrypting and verification of the signature.When gateway gets response from the web service,it signs the response message and then encrypt and passs on to the client.
    So my question is,is it the right way to secure web service?
    As I am getting the following fault exception :
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode "http://schemas.oblix.com/ws/2003/08/Faults">c</faultcode>
    <faultstring>Step execution failed with an exception
    </faultstring>
    <detail></detail>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    I checked the log at :
    C:\coresv_install_home\external\oc4j-10.1.2.0.0\j2ee\home\log\http-web-access
    but there is no helpful information available.Thanks for any help.
    Kash

    Hi Rajesh,
    Thanks for your reply.I am using the following policy steps:
    1)for Request (Decrypt and Verify signature).
    2)for Response(Sign Message and Encrypt).
    The configuration for Request is shown below:
    Pipeline "Request"
    Pipeline Steps:
    Start Pipeline
    Log
    Decrypt and Verify Signature
    Basic Properties Type Default Value
    Enabled (*) boolean true true
    XML Decryption Properties Type Default Value
    Decryptor''s keystore location (*) string C:\Sun\jwsdp-2.0\xws-security\etc\server-keystore.jks
    Decrypt Keystore Type (*) string jks jks
    Decryptor''s keystore password string *******
    Decryptor''s private-key alias (*) string s1as
    Decryptor''s private-key password string *******
    Enforce Encryption (*) boolean true true
    XML Signature Verification Properties Type Default Value
    Verifying Keystore location (*) string C:\Sun\jwsdp-2.0\xws-security\etc\server-truststore.jks
    Verifying Keystore type (*) string jks jks
    Verifying Keystore password string *******
    Signer''s public-key alias (*) string xws-security-client
    Enforce Signing (*) boolean true true
    End Pipeline
    And the configuration for Response is shown below:
    Pipeline "Response"
    Pipeline Steps:
    Start Pipeline
    Log
    Sign Message and Encrypt
    Basic Properties Type Default Value
    Enabled (*) boolean true true
    Signing Properties Type Default Value
    Signing Keystore location (*) string C:\Sun\jwsdp-2.0\xws-security\etc\server-keystore.jks
    Signing Keystore Type (*) string jks jks
    Signing Keystore password string *******
    Signer''s private-key alias (*) string s1as
    Signer''s private-key password string *******
    Signed Content (*) string BODY BODY
    Sign XPATH Expression string
    Sign XML Namespace string[]
    Encryption Properties Type Default Value
    Encryption Keystore location (*) string C:\Sun\jwsdp-2.0\xws-security\etc\server-truststore.jks
    Encrypt Keystore Type (*) string jks jks
    Encryption Keystore password string *******
    Decryptor''s public-key alias (*) string xws-security-client
    Encrypted Content (*) string BODY BODY
    Encrypt XPATH Expression string
    Encrypt XML Namespace string[]
    End Pipeline
    I checked the log again but nothing useful there,it is just giving the following values:
    2006-08-14 16:32:50,372 INFO [Thread-21] mstore.OLiteMStore - SELECT MEASUREMENT_STR FROM MEASUREMENT_PERSISTED_STORE WHERE ID=? FOR UPDATE
    2006-08-14 16:34:50,364 INFO [Thread-16] mstore.OLiteMStore - INSERT INTO MEASUREMENT_PERSISTED_STORE (ID,DEF_ID,CONTEXT_ID,PARENT_CONTEXT_ID,TIME,STORETIME,KEY0,KEY1,KEY2,KEY3,KEY4,KEY5,KEY6,KEY7,KEY8,KEY9,KEY10,KEY11,KEY12,KEY13,KEY14,KEY15,KEY16,KEY17,KEY18,KEY19,KEY20,KEY21,KEY22,KEY23,KEY24,KEY25,KEY26,KEY27,KEY28,KEY29,KEY30,KEY31,KEY32,KEY33,KEY34,KEY35,KEY36,KEY37,KEY38,KEY39,DBM0,MEASUREMENT_STR) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,'R',empty_clob())
    2006-08-14 16:34:50,364 INFO [Thread-16] mstore.OLiteMStore - SELECT MEASUREMENT_STR FROM MEASUREMENT_PERSISTED_STORE WHERE ID=? FOR UPDATE
    Any help would be appreciated.Thanks.
    Kash

  • Case INSENSITIVE Columns on Oracle

    Hello Friends,
    Good Monday for everyone....
    I would like to ask you guys if there is a way to create a case INSENSITIVE Columns on Oracle. I used on Sqlserver before the COLLATE sintax, and I was able to make a columns (just that one) INSENSITIVE.
    I'm using oracle 10gr2 on Windows plataform and herte is my nls_parameters. My ideia is to search on this column without the need of performing a function UPPER and LOWER and etc...
    NLS_LANGUAGE BRAZILIAN PORTUGUESE
    NLS_TERRITORY BRAZIL
    NLS_CURRENCY Cr$
    NLS_ISO_CURRENCY BRAZIL
    NLS_NUMERIC_CHARACTERS ,.
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD/MM/RR
    NLS_DATE_LANGUAGE BRAZILIAN PORTUGUESE
    NLS_CHARACTERSET WE8MSWIN1252
    NLS_SORT WEST_EUROPEAN
    NLS_TIME_FORMAT HH24:MI:SSXFF
    NLS_TIMESTAMP_FORMAT DD/MM/RR HH24:MI:SSXFF
    NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
    NLS_TIMESTAMP_TZ_FORMAT DD/MM/RR HH24:MI:SSXFF TZR
    NLS_DUAL_CURRENCY Cr$
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    tks a lot
    Keen

    APC wrote:
    No, they mean a setting which makes "APC" or "apc" match "Apc".
    There is nothing to be done on 10g, other than building a function based index on the column in question, so that any UPPER() searches are optimized.
    Well, as Kamran Agayev already noted CI is available in 10g too. It also worth mentioning FBI creates a hidden column. Also, your statement
    In 11g we have the option to set the NLS_SORT parameter so that any searches are case-insensitive (or indeed accent insensitive). Find out more.
    is incomplete. NLS_SORT affects nothing but sort:
    SQL> connect scott
    Enter password: *****
    Connected.
    SQL> select * from v$version
      2  /
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL> with t as (
      2             select 'Max' name from dual union all
      3             select 'sam' name from dual union all
      4             select 'Joe' name from dual union all
      5             select 'max' name from dual union all
      6             select 'joe' name from dual union all
      7             select 'Sam' name from dual
      8            )
      9  select  name
    10    from  t
    11    order by name
    12  /
    NAM
    Joe
    Max
    Sam
    joe
    max
    sam
    6 rows selected.
    SQL> with t as (
      2             select 'Max' name from dual union all
      3             select 'sam' name from dual union all
      4             select 'Joe' name from dual union all
      5             select 'max' name from dual union all
      6             select 'joe' name from dual union all
      7             select 'Sam' name from dual
      8            )
      9  select  name
    10    from  t
    11    where name = 'max'
    12  /
    NAM
    max
    SQL> alter session set nls_sort = binary_ci
      2  /
    Session altered.
    SQL> with t as (
      2             select 'Max' name from dual union all
      3             select 'sam' name from dual union all
      4             select 'Joe' name from dual union all
      5             select 'max' name from dual union all
      6             select 'joe' name from dual union all
      7             select 'Sam' name from dual
      8            )
      9  select  name
    10    from  t
    11    order by name
    12  /
    NAM
    Joe
    joe
    max
    Max
    Sam
    sam
    6 rows selected.
    SQL> with t as (
      2             select 'Max' name from dual union all
      3             select 'sam' name from dual union all
      4             select 'Joe' name from dual union all
      5             select 'max' name from dual union all
      6             select 'joe' name from dual union all
      7             select 'Sam' name from dual
      8            )
      9  select  name
    10    from  t
    11    where name = 'max'
    12  /
    NAM
    max
    SQL> with t as (
      2             select 'Max' name from dual union all
      3             select 'sam' name from dual union all
      4             select 'Joe' name from dual union all
      5             select 'max' name from dual union all
      6             select 'joe' name from dual union all
      7             select 'Sam' name from dual
      8            )
      9  select  name
    10    from  t
    11    where name like 'm%'
    12  /
    NAM
    max
    SQL> select 'Max' name from dual union
      2  select 'max' name from dual
      3  /
    NAM
    Max
    max
    SQL> with t as (
      2             select 'Max' name from dual union all
      3             select 'sam' name from dual union all
      4             select 'Joe' name from dual union all
      5             select 'max' name from dual union all
      6             select 'joe' name from dual union all
      7             select 'Sam' name from dual
      8            )
      9  select  distinct name
    10    from  t
    11  /
    NAM
    sam
    Joe
    joe
    max
    Sam
    Max
    6 rows selected.
    SQL> As you can see, NLS_SORT alone works on sort but not on "searches". We also need to set NLS_COMP, which by default is BINARY. Prior to 10g R2 (I am not 100% sure, it could be prior 10g), the only NLS_COMP choice, besides BINARY, was ANSI. However, ANSI does not work with all comparison operators (e.g. does not work for LIKE, UNION, DISTINCT):
    SQL> alter session set nls_sort = binary_ci
      2  /
    Session altered.
    SQL> alter session set nls_comp=ansi
      2  /
    Session altered.
    SQL> with t as (
      2             select 'Max' name from dual union all
      3             select 'sam' name from dual union all
      4             select 'Joe' name from dual union all
      5             select 'max' name from dual union all
      6             select 'joe' name from dual union all
      7             select 'Sam' name from dual
      8            )
      9  select  name
    10    from  t
    11    order by name
    12  /
    NAM
    Joe
    joe
    max
    Max
    Sam
    sam
    6 rows selected.
    SQL> with t as (
      2             select 'Max' name from dual union all
      3             select 'sam' name from dual union all
      4             select 'Joe' name from dual union all
      5             select 'max' name from dual union all
      6             select 'joe' name from dual union all
      7             select 'Sam' name from dual
      8            )
      9  select  name
    10    from  t
    11    where name = 'max'
    12  /
    NAM
    Max
    max
    SQL> with t as (
      2             select 'Max' name from dual union all
      3             select 'sam' name from dual union all
      4             select 'Joe' name from dual union all
      5             select 'max' name from dual union all
      6             select 'joe' name from dual union all
      7             select 'Sam' name from dual
      8            )
      9  select  name
    10    from  t
    11    where name like 'm%'
    12  /
    NAM
    max
    SQL> select 'Max' name from dual union
      2  select 'max' name from dual
      3  /
    NAM
    Max
    max
    SQL> with t as (
      2             select 'Max' name from dual union all
      3             select 'sam' name from dual union all
      4             select 'Joe' name from dual union all
      5             select 'max' name from dual union all
      6             select 'joe' name from dual union all
      7             select 'Sam' name from dual
      8            )
      9  select  distinct name
    10    from  t
    11  /
    NAM
    sam
    Joe
    joe
    max
    Sam
    Max
    6 rows selected.
    SQL> Starting 10g R2 NLS_COMP can be set to LINGUISTIC, which will also work for LIKE and UNION but not for DISTINCT:
    SQL> alter session set nls_sort = binary_ci
      2  /
    Session altered.
    SQL> alter session set nls_comp=linguistic
      2  /
    Session altered.
    SQL> with t as (
      2             select 'Max' name from dual union all
      3             select 'sam' name from dual union all
      4             select 'Joe' name from dual union all
      5             select 'max' name from dual union all
      6             select 'joe' name from dual union all
      7             select 'Sam' name from dual
      8            )
      9  select  name
    10    from  t
    11    order by name
    12  /
    NAM
    Joe
    joe
    max
    Max
    Sam
    sam
    6 rows selected.
    SQL> with t as (
      2             select 'Max' name from dual union all
      3             select 'sam' name from dual union all
      4             select 'Joe' name from dual union all
      5             select 'max' name from dual union all
      6             select 'joe' name from dual union all
      7             select 'Sam' name from dual
      8            )
      9  select  name
    10    from  t
    11    where name = 'max'
    12  /
    NAM
    Max
    max
    SQL> with t as (
      2             select 'Max' name from dual union all
      3             select 'sam' name from dual union all
      4             select 'Joe' name from dual union all
      5             select 'max' name from dual union all
      6             select 'joe' name from dual union all
      7             select 'Sam' name from dual
      8            )
      9  select  name
    10    from  t
    11    where name like 'm%'
    12  /
    NAM
    Max
    max
    SQL> select 'Max' name from dual union
      2  select 'max' name from dual
      3  /
    NAM
    Max
    SQL> with t as (
      2             select 'Max' name from dual union all
      3             select 'sam' name from dual union all
      4             select 'Joe' name from dual union all
      5             select 'max' name from dual union all
      6             select 'joe' name from dual union all
      7             select 'Sam' name from dual
      8            )
      9  select  distinct name
    10    from  t
    11  /
    NAM
    sam
    Joe
    joe
    max
    Sam
    Max
    6 rows selected.
    SQL> However even LINGUISTIC does not work with:
    • CLOB or NCLOB data types
    • Object data types
    • Table partitions
    • Index-organized tables
    SY.

Maybe you are looking for