What is the empty string, the value null in the column, or...?

I use Oracle 11.2, a table tb_class as follows:

TB_CLASS (number (3) id, varchar2 (32) nm, seqNum number (3));

1, 212
2, "under", 12
3, 'qq', 12

Select * from TB_CLASS where id = 1 and n = null;... .no selected line
Select nvl (nm) in the TB_CLASS where id = 1; ... 1 selected line

Any know what's in the column of row id = 1 nm? I thought that it is an empty string, but why it returns no rows in the first query?

Thank you!

(1) in Oracle there is no difference between NULL and an empty string.

(2) NULL is never equal to what whatsoever (including another NULL). NULL is never spotty what whatsoever (including another NULL). You must use the IS NULL and IS NOT NULL operators to search for NULL values

SELECT *
  FROM tb_class
 WHERE nm IS NULL

or

SELECT *
  FROM tb_class
 WHERE nm IS NOT NULL

Of course, it is also possible that you declare that the NM column contains one or more spaces or it contains one or more non-printable characters and not a NULL value. That's why we asked you what dump (nm) returns

Justin

Tags: Database

Similar Questions

  • What SYS tables (not seen) contains the value NULL spec /not/ column definition?

    What SYS (or tables) store the value of a spec /not/ NULL columns? (It doesn't seem to be COL$)

    NOTE: This is NOT a trick question - although it seems to be.

    Test configuration:
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Test configuration:
    1. a table is created by SCOTT in the SCOTT schema with a NULLABLE column.

    2. a primary key constraint is added using only the NULLABLE column

    3. Requests for information on USER_TAB_COLS, ALL_TAB_COLS, DBA_TAB_COLS and SYS. COL$ see NOT NULL for the column NULLABLE
    as necessary for a primary key constraint. Views derive their data from the column of $ NULL the sys. Table of $ COL
    using
    'DECODE (SIGN (c.null$), -1, 'D', 0, 'Y', 'N'),
    and the table of $ COL shows a numerical value of '0' before you add the primary key and a value of "1" later.

    4. a query on the DDL metadata table shows the specification for column NULLABLE of origin involved.

    Question - where this original specification NULLABLE is stored?

    This question is based on a question asked by another user in this thread
    Columns becoming nullable after a fall of primary key?

    I created the following specially for that matter test case
    -- scott ensures table does not exist
    DROP TABLE tbl_test CASCADE CONSTRAINTS;
    
    -- scott creates a table
    CREATE TABLE tbl_test ( col_1 NUMBER,
    col_2 NUMBER NOT NULL);
    
    -- scott queries to check the the column nullable status
    SELECT table_name, column_name, nullable 
    FROM user_tab_cols
    WHERE table_name = 'TBL_TEST';
    
    -- TABLE_NAME | COLUMN_NAME | NULLABLE
    -- TBL_TEST   | COL_1       | Y 
    -- TBL_TEST   | COL_2       | N 
    
    -- Scott addes a primary key constraint using only the nullable column
    ALTER TABLE tbl_test ADD CONSTRAINT tbl_test_pk PRIMARY KEY(col_1);
    
    -- scott queries to check the the column nullable status
    SELECT table_name, column_name, nullable 
    FROM user_tab_cols
    WHERE table_name = 'TBL_TEST';
    
    TABLE_NAME,COLUMN_NAME,NULLABLE
    TBL_TEST,COL_1,N
    TBL_TEST,COL_2,N
    
    -- scott queries to get the table DDL
    select dbms_metadata.get_ddl('TABLE', 'TBL_TEST', 'SCOTT') FROM DUAL;
    
    DBMS_METADATA.GET_DDL('TABLE','TBL_TEST','SCOTT')
    
      CREATE TABLE "SCOTT"."TBL_TEST" 
       (     "COL_1" NUMBER,                   <------ where is this NULLABLE spec stored? 
         "COL_2" NUMBER NOT NULL ENABLE, 
          CONSTRAINT "TBL_TEST_PK" PRIMARY KEY ("COL_1")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOCOMPRESS LOGGING
      TABLESPACE "USERS"  ENABLE
       ) SEGMENT CREATION DEFERRED 
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      TABLESPACE "USERS" 
    The DOF shows that Oracle keeps the original spec NULLABLE for the column and uses it to generate the DDL orginal, even if there is a primary key on the table and the system views (and COL$) show the column non NULLABLE.

    So where is the original information NULLABLE actually stored?

    rp0428 wrote:
    What SYS (or tables) store the value of a spec /not/ NULL columns? (It doesn't seem to be COL$)

    I think that it becomes a bit messy depending on order of activity:

    You can see Col. .null$ is set to a non-zero when the desrcibe command displays the column as not null, but it can happen for two reasons:
    (a) user sets the column as not null - in which case you get a line in cdef$ with type # = 7
    (b) the user adds a primary key to table - in which case you get a line in cdef$ with type # = 2

    If you declare null AND add a primary key, you get two lines - that's why it is possible for Oracle to determine if he should remove the flag not null when you remove the primary key and also allows dbms_metadata show the create statement of table without a NOT NULL even when describe it the watch with a NOT NULL - dbms_metadata can respond to the presence of the type # = 2 and absence of the type # = 7.

    Concerning
    Jonathan Lewis

    By the way: by a strange coincidence, it seems to me answering the previous post, three days before it was asked: http://jonathanlewis.wordpress.com/2012/04/19/drop-constraint/#comment-46140 (on the doubts, this isn't - it answers a different question on the removal of constraints).

    Published by: Jonathan Lewis April 23, 2012 11:07

  • What is the column location in Thunderbird?

    What I * want * it is is the e-mail file is stored in the, when I look at my search, as _All Mail_ or laborious Attachments_ folders. As it is, it seems to * always * be empty. What is it?

    When your doing a global search and select the show as a list when the results come back. The folder in which the mail is located appears in this column.

  • What are the columns FIRST_TIME, NEXT_TIME and COMPLETION_TIME in v$ archived_log?

    DB version: 11.2 on Solaris 11

    The official documentation V $ ARCHIVED_LOG provides the following information on FIRST_TIME and NEXT_TIME, columns COMPLETION_TIME

    http://docs.Oracle.com/CD/E18283_01/server.112/e17110/dynviews_1016.htm

    FIRST_TIME-> Timestamp of the first amendment

    NEXT_TIME-> Timestamp of the next change

    COMPLETION_TIME-> time when archiving complete


    NEXT_TIME and COMPLETION_TIME seem to be the same for most of the files. I see FIRST_TIME and NEXT_TIME in V$ LOG as well. So I guess FIRST_TIME is at startup when online entries written LGWR Redo sequence Redolog X.

    and NEXT_TIME is the time when LGWR finished writing Redo entries to Redolog sequence X online.

    V$ ARCHIVED_LOG.completion_time seems to be the same that NEXT_TIME, so archiving seems to occur as soon as the written LGWR is finished.

    My above assumption is correct?

    Select name, first_time, next_time, completion_time from v$ archived_log where status = 'A' and rownum < 9

    NAME FIRST_TIME NEXT_TIME COMPLETION_TIME

    -------------------------------------------------------------------------------- ---------------- ---------------- ----------------

    +CTG_ARCH/ctgsprd/ARCHIVELOG/2014_07_09/thread_2_seq_16832.941.852436253 07/09/2014 02:58 07/09/2014 03:50 07/09/2014 03:51

    +CTG_ARCH/ctgsprd/ARCHIVELOG/2014_07_09/thread_2_seq_16833.940.852439233 07/09/2014 03:50 07/09/2014 04:40 07/09/2014 04:40

    +CTG_ARCH/ctgsprd/ARCHIVELOG/2014_07_09/thread_1_seq_16296.937.852442223 07/09/2014 02:58 07/09/2014 05:30 07/09/2014 05:30

    +CTG_ARCH/ctgsprd/ARCHIVELOG/2014_07_09/thread_2_seq_16834.939.852442221 07/09/2014 04:40 07/09/2014 05:30 07/09/2014 05:30

    +CTG_ARCH/ctgsprd/ARCHIVELOG/2014_07_09/thread_2_seq_16835.936.852444733 07/09/2014 05:30 07/09/2014 06:12 07/09/2014 06:12

    +CTG_ARCH/ctgsprd/ARCHIVELOG/2014_07_09/thread_2_seq_16836.935.852446839 07/09/2014 06:12 07/09/2014 06:47 07/09/2014 06:47

    +CTG_ARCH/ctgsprd/ARCHIVELOG/2014_07_09/thread_2_seq_16837.933.852455413 07/09/2014 06:47 07/09/2014 09:10 07/09/2014 09:10

    +CTG_ARCH/ctgsprd/ARCHIVELOG/2014_07_09/thread_1_seq_16297.932.852455415 07/09/2014 05:30 07/09/2014 09:10 07/09/2014 09:10

    SQL > fixed lines 80

    SQL > Journal of the desc v$

    Name                                      Null?    Type

    ----------------------------------------- -------- ----------------------------

    GROUP#                                             NUMBER

    THREAD NUMBER #

    SEQUENCE NUMBER #.

    BYTES                                              NUMBER

    NUMBER OF BLOCKSIZE

    NUMBER OF MEMBERS

    ARCHIVED VARCHAR2 (3)

    STATUS VARCHAR2 (16)

    FIRST_CHANGE # NUMBER

    FIRST_TIME DATE

    NEXT_CHANGE # NUMBER

    DATE OF NEXT_TIME

    SQL >

    > Thus, archiving seems to occur as soon as the written LGWR is finished.

    Of course. Yes.  ARCH resumes when LGWR notifies that he ended up writing in the journal online redo (file) and tipped the next newspaper.

    Note: There may be a slight delay between the NEXT_TIME and COMPLETION_TIME when the log file is large and/or writing ARCH is slow.

    Hemant K Collette

  • Empty string and null

    Hello

    Oracle treats the empty string as a NULL value.
    If it is so, can force us db to treat two different things.

    Thanx

    11 g DBA wrote:
    Hello

    Oracle treats the empty string as a NULL value.

    Yes.

    If it is so, can force us db to treat two different things.

    N °

    Please read in SQL Reference:
    http://docs.Oracle.com/CD/E11882_01/server.112/e26088/sql_elements005.htm#SQLRF3003

  • Error trying to filter the column named 'value' in the tab data

    I do not know it is because of the name of the column because all the other columns are working fine, but when I try to filter on the value = 60, I get an error:

    ORA-01722 invalid number
    Code provider 1722

    Is there a way I can filter this column? I tried quotes around column name, 'value' = 60, but that did not help.

    Thank you
    -Bill

    What is the column data type and details? What happens if you (single) quote "60" instead?

    K.

    Published by: - K - 10/28/2009 14:12: corrected apostrophes

  • How can I change the columns in the fluid grid to a darker color.  The default color is too gray for me to see them on my screen

    Thanks for any comments I receive. This version is CC2015.

    peoj

    Dreamweaver does not create columns colored for a grid "bootstrap" for good reason: each line has its own set of columns in the layout. So, if you nest a row within another column, the nested line gets a new grid layout of 12 columns (assuming you are using a default grid). Although having a color grid layout looks like a good idea, it would become very difficult to work as soon as you start the nesting of the lines.

    In Live View mode, Dreamweaver adds a handle to resize the column to the right edge of the currently selected column:

    There are also a handful of column Offset on the left edge

    When you drag handles, Dreamweaver snaps to the next column and it will update the .col-*-* or the classes in the display of the item. In the previous screenshot, you can see immediately that the currently selected column is an important feature of 10 columns wide and is offset by a column.

    It takes a little practice to get used to its operation, but it quickly becomes clear what are the columns of size without the distraction of a color to the background grid.

  • What is the syntax to judge a binding value is null?

    Hello

    12.1.3 JDev is used.

    I want to judge #{bindings. ReviewerA.inputValue} is null or not, what is the syntax? I use this to control the visibility of a tab, however no matter the value actually is zero or not, the tab will appear, I am currently using "#{bindings." ReviewerA.inputValue} is empty", it works very well, thank you

    -Liang Yi

    I want to judge #{bindings. ReviewerA.inputValue} is null or not, what is the syntax?

    #{bindings. ReviewerA.inputValue == null} or #{bindings. ReviewerA.inputValue! = null}

    I am currently using "#{bindings." ReviewerA.inputValue} is empty. "

    As far as I KNOW, 'empty' syntax is: #{empty links. ReviewerA.inputValue}.

    Dario

  • Displaying a string instead of the "null" value in the columns of answers

    Hi, is it possible to display a string (e.g. "no data") in responses instead a NULL value in a column of a table or a PivotTable? I read everything by using the formula in the column section in the answers, but I do not understand what expression should be used... could you help me?

    Is this kind of possible substitution only in the web interface of answers, or still in BI Admin meta - data? I would be very interested to recognize from analysis UDML in metadata,
    Thanks in advance!

    You must do this in the business model and the Mapping layer

    Go to the properties of the column

    1. in general tab, you have "use existing columns of logic as a source.
    Select this check box. Click the period (...)
    In the formula for the column, you can add the condition of ifnull
    In this col formula editor, you can choose the logical columns.

    2. on the Data Type tab, you have the maps and logical sources
    Here too you can achieve.
    In this col formula editor, you can choose physical columns.

    Kind regards
    Rambeau

  • Eloqua reporting: what is the difference between 'Link clicks' and 'interactive generated query string value "?

    clicks.png

    Sometimes, I need to look at the link clicks in order to determine what link they clicked and sometimes the value of query string. What is the difference?

    Redirect link is the actual URL that redirects to a specific Web site location.

    Value of query string of clicks is what follows after the "?" in the link. These query strings do not change the location where the user is directed to but is for information purposes.

    If you were to combine interactive generated link and the value of clicks query string, you will get the full link following the user.

    Example: In your screenshot, for the first row in the report, the user would have followed this link:

    https://play.Google.com/store/apps/details?ID=no.osloby.app

    The report broke it into 2 parts: clicks link (https://play.google.com/store/apps/details) and the value of query string of clicks (? id = no.osloby.app).

    You can create custom query strings under configuration > site: query strings. This can be useful if you want to create your own way to mark up and view metrics on clicks for links. When you define a query string parameter, you can add this setting with different values at the end of the links to follow only those (ex: "?") QueryStringParam = value1'). I used this is to differentiate between separate instances of identical links in the same email (ex: a link is a banner image and text) to see who is the most useful and results in the most traffic. You can then view a breakdown of clicks by each query string under Insight > reports and dashboards > site > overview of Query String parameters.

    Hope this helps... Let me know if you have any other questions.

  • What is the initial value of a drop-down list empty?

    I wrote a script to populate the items in a drop-down list but only if there is no existing entry.

    The problem I have is to acknowledge that the list is empty. I tried to test the value null (if dropdown.isNull = true) and test the

    rawValue = "" and a bunch of other things without good result.

    I don't know that it's easy, but apparently not for me.

    Thanks for the help!

    These commands to test the value selected by the user. As they have not chosen anything and yet they will not have a value.

    The command:

    DropDownList1.items.nodes.length

    This will give you the number of items in the DDlist. It is 1 based. Note that it will count all the elements that have been added to the drop-down list by the user.

    Paul

  • How to assign the text value when the data in the column is null or empty

    Hello guys

    I have a small question

    I have a column A that half of its value is empty, now the condition is that whenever the column is empty, assign "N/a" in the column... So I wrote a code which is:

    <? If: not (column A)? > column a = 'n/a' <? end if? >

    However, when I preview the RTF model, the data in the column still has not changed at all, many lines are still empty and did not show 'n/a '... The column is of type text

    Please advice

    Thank you
    N/A
    
  • Empty text box value when reading about the LV2012 development system but no Production

    Development platform: 32-bit Windows 7, LV2012 Professional Development System.

    Production of platforms: Windows XP.

    We have a test application, we have developed (in haste, I might add) who has a curious problem.  As part of the installation for each test, read us a text box with a serial number entry and record them in the log files.  Series enough.

    This works very well on production machines - no apparent problem.

    However, on the development computer, when I try to read the text box, all I get is an empty string.  I tried to read directly from the Terminal, as well as using a property value box.  Each time, there is nothing in the string.  This is even though I'm looking at the text box and there are visible data in it.

    Clear the text box repeatedly, I'm looking to see if any of those that occur at the wrong time.  And, indeed, I am looking a probe value of ' ' from the property node Value with the string "1234" visible in the text box while NONE of the compensation functions have been affected.

    The test application uses a pretty standard user interface event loop model, with an event loop manages the user input and the other event loop manages the business logic.

    Anyone have any idea what can cause this, or a better search string to find clues?

    Thank you

    Geoff

    As promised, I did go to the bottom of it.

    Simply enable "update of value while typing" gave me the result I expected.

    To explain: I had a key event down to the first text box that has been copied to this text box.  Whenever a key was hit in this text box, the value would be read and updated.  I did not have all the events for the new text box.  It has not been updated to what some other events.  At that time, it was apparently too late (most of the time on the development computer) and occasionally on the Production machine.

    Activation of the "Update value while typing" indicator means that the value field would properly up-to-date each time he has been seen/accessible.

    Life is a learning experience...

  • Cell.Contents not correctly resolve the empty strings if in excess... Is this a Bug or me?

    Greetings, Folks.

    It's driving me crazy. I can reproduce the problem over and over again. I'm missing a reason why cell.contents would be assessed differently in the case of condition in excess than no? I don't understand...

    Here is the scenario of. CS6, Win7, VB.Net (but the logic is simple so stay with me...).

    Object in question is a line of 3 cells with values in the respective cells: text, double value, double the value.

    Here's the problem. (gitc = 1 in all these test cases)

    If Not HasValue (curRow.Cells(gitc + 1). Content) then

    Here's the simple function called by the line above:

    Private Function HasValue (value as object( ) As Boolean

       If IsDBNull (value) OrElse value = "" Then Return Fake Else Return True

    End Function

    That is the problem. The code works as expected, provided that the referenced line is not in a State in excess, the object is a text value, and of two values, where the function returns an appropriate assessment. But if the line is in a State in excess, the object resolves in three empty strings ("" ") and as a result, the function returns the wrong assessment.

    Here the rub. If I lie down (or shorten) the column that puts a DIFFERENT line in the place in excess, the same result occurs to this different line, so I know that's not the values.

    Sorry for the long explanation, but I felt that it is important to give as much information as possible when you ask for help.

    Thank you very much for any help and/or an overview.

    TT

    Ah, I am a JavaScripter, but the Council is good even if the syntax is incorrect.

    The fact is that, if the cell is in excess and then its content is indeed empty. What is not empty is the subject of the text in the cell. You probably should look into it. In JavaScript is:

    myCell.texts [0] .silence

    Dave

  • Copy topologies from 10 g to the results of the 11 g by empty string error

    Hi people,

    I know it's a long shot, but anyone happen to know what is on line 189 of the MDSYS. SDO_TOPO_MAP? :-)

    We are copying valid topologies 10.2.0.4 to 11.2.0.2 using exp/imp, following the standard procedure and also add toid_novalidate to the need:

    IMP < user > / < pw > @ < database > FILE = < file > .dmp TOID_NOVALIDATE = MDSYS. SDO_GEOMETRY, MDSYS. SDO_ELEM_INFO_ARRAY, MDSYS. SDO_ORDINATE_ARRAY, MDSYS. Index SDO_TOPO_GEOMETRY = ignore tables N = Y = (< list table >)

    However, when the topology 11.2.0.2 everything seems to be a success, until we run sdo_topo_map.validate_topology:

    ORA-29532: Java call terminated by eception Java exception: java.lang.NumberFormatException: empty string
    ORA-06512: at the 'MDSYS. SDO_TOPO_MAP', line 189
    ORA-06512: at line 4 level

    No idea what we are missing here? Thanks in advance for any advice,
    Matt

    It is a combination of a JDBC bug and a corruption of data due to the bug in 10.2.
    The JDBC bug is fixed at 11.2, so data are not 'corrupt' according to the JDBC driver fixed.

    So, the data on the disk must be altered to make it compatible with the 11.2 JDBC driver.
    You must correct the sdo_geometry columns in the tables of topology using this procedure and it will work fine after that.

    create or replace function id_geom (sdo_geometry g)
    deterministic sdo_geometry back as
    G1 sdo_geometry;
    IDX number;
    Sdo_ordinate_array ADR;
    x number;
    number of y;
    number of z;
    point_t SDO_POINT;
    Start
    If (g.sdo_point is not NULL) then
    x: = NULL; y: = NULL; z: = NULL;
    If (g.sdo_point.x is not NULL) then
    x: = g.sdo_point.x * 10;
    x: = x / 10.
    end if;
    If (g.sdo_point.y is not NULL) then
    y: = g.sdo_point.y * 10;
    y: = y / 10;
    end if;
    If (g.sdo_point.z is not NULL) then
    z: = g.sdo_point.z * 10;
    z: = z / 10;
    end if;
    point_t: = SDO_POINT_TYPE (x, y, z);
    on the other
    point_t: = NULL;
    end if;

    If (g.sdo_ordinates is not NULL) then
    ADR: = sdo_ordinate_array();
    ords.extend (g.sdo_ordinates. (Count);
    for idx in 1... loop ords. Count
    x: = g.sdo_ordinates (idx);
    x: = (x * 10.0);
    x: = x / 10.0;
    ords (idx): = x;

    end loop;
    G1: = sdo_geometry (g.sdo_gtype, g.sdo_srid, point_t, g.sdo_elem_info, ords);
    on the other
    G1: = sdo_geometry (g.sdo_gtype, g.sdo_srid, point_t, g.sdo_elem_info, NULL);
    end if;

    return g1;
    end;
    /

    so that you can SQL like this to fix the sdo_geometry columns in all the tables in the topology:
    Update test_topology_edge$ a set a.geometry = id_goem (geometry);

    Make sure that the Spatial index is deleted before doing this operation.

    Siva

Maybe you are looking for

  • Why the TB cannot find my boxes for import Eudora mailbox?

    I have my data from the Eudora Application folder, named Eudora, stored on my desk. When I try to import my files of e-mail with Thunderbird Eudora, it blocks to Thunderbird. After a little detective, I found that TB is not the mail files. Where TB a

  • What IS BEST VERSION OF FIREFOX to VISTA 64-BIT OS?

    I have a Dell laptop which come to install a 64 bit Vista OS and want to use Firefox as my default browser.I WOULD LIKE SOMEONES SUGGESTION FOR THE BEST VERSION TO USE. Thank you.

  • Hardware upgrade on the A30-514

    I HERE TO UPDATE MY LAPTOP TOSHIBA A30-514 WITH THE NEW MOTHERBOARD AND CPU PLUS CARD FAST PLEASE ADVICE AS BEST OPTIONS I CAN TAKE

  • Pavilion P6-2260ea, recovery disks won't laod on new hard drive.

    I have a Pavilion P6-2260ea who started running very slowly and crash intermittently.  Self-assessment of DPS ran the disk, the drive specified result was suspect and should be replaced.  I bought a Seagate Barracuda SATA drive to replace the SATA Hi

  • Memory from the Flushing call library function node

    I use the function call library (COLD LAKE) node to load some dll dynamically in a same vi. I use a loop for to send the DLL files or a table to COLD LAKE to load the different dll. For the first iteration, the COLD LAKE works very well, but for the