What is the difference between "= NULL" and "IS NULL" in SQL?

Hi,
I believe there is a difference between "= NULL" and "IS NULL" comparsion, but I couldn't find it. Anyone knows the difference?
Thanks,
Denny

Aha, thanks:
SQL> create table william_test_tab (col binary_double);
Table created.
SQL> insert into william_test_tab
  2  select rownum / (rownum - 1) from user_tables where rownum < 4;
select rownum / (rownum - 1) from user_tables where rownum < 4
ERROR at line 2:
ORA-01476: divisor is equal to zero
SQL> insert into william_test_tab
  2  select 1d * rownum / (rownum - 1) from user_tables where rownum < 4;
3 rows created.
SQL> select * from william_test_tab;
       COL
       Inf
  2.0E+000
  1.5E+000
3 rows selected.
SQL> select * from william_test_tab where col is infinite;
       COL
       Inf
1 row selected.
SQL>

Similar Messages

  • What is the difference between tkprof and explainplan

    Hi,
    what is the difference between tkprof and explainplan.

    Execution Plans and the EXPLAIN PLAN Statement
    Before the database server can execute a SQL statement, Oracle must first parse the statement and develop an execution plan. The execution plan is a task list of sorts that decomposes a potentially complex SQL operation into a series of basic data access operations. For example, a query against the dept table might have an execution plan that consists of an index lookup on the deptno index, followed by a table access by ROWID.
    The EXPLAIN PLAN statement allows you to submit a SQL statement to Oracle and have the database prepare the execution plan for the statement without actually executing it. The execution plan is made available to you in the form of rows inserted into a special table called a plan table. You may query the rows in the plan table using ordinary SELECT statements in order to see the steps of the execution plan for the statement you explained. You may keep multiple execution plans in the plan table by assigning each a unique statement_id. Or you may choose to delete the rows from the plan table after you are finished looking at the execution plan. You can also roll back an EXPLAIN PLAN statement in order to remove the execution plan from the plan table.
    The EXPLAIN PLAN statement runs very quickly, even if the statement being explained is a query that might run for hours. This is because the statement is simply parsed and its execution plan saved into the plan table. The actual statement is never executed by EXPLAIN PLAN. Along these same lines, if the statement being explained includes bind variables, the variables never need to actually be bound. The values that would be bound are not relevant since the statement is not actually executed.
    You don’t need any special system privileges in order to use the EXPLAIN PLAN statement. However, you do need to have INSERT privileges on the plan table, and you must have sufficient privileges to execute the statement you are trying to explain. The one difference is that in order to explain a statement that involves views, you must have privileges on all of the tables that make up the view. If you don’t, you’ll get an “ORA-01039: insufficient privileges on underlying objects of the view” error.
    The columns that make up the plan table are as follows:
    Name Null? Type
    STATEMENT_ID VARCHAR2(30)
    TIMESTAMP DATE
    REMARKS VARCHAR2(80)
    OPERATION VARCHAR2(30)
    OPTIONS VARCHAR2(30)
    OBJECT_NODE VARCHAR2(128)
    OBJECT_OWNER VARCHAR2(30)
    OBJECT_NAME VARCHAR2(30)
    OBJECT_INSTANCE NUMBER(38)
    OBJECT_TYPE VARCHAR2(30)
    OPTIMIZER VARCHAR2(255)
    SEARCH_COLUMNS NUMBER
    ID NUMBER(38)
    PARENT_ID NUMBER(38)
    POSITION NUMBER(38)
    COST NUMBER(38)
    CARDINALITY NUMBER(38)
    BYTES NUMBER(38)
    OTHER_TAG VARCHAR2(255)
    PARTITION_START VARCHAR2(255)
    PARTITION_STOP VARCHAR2(255)
    PARTITION_ID NUMBER(38)
    OTHER LONG
    DISTRIBUTION VARCHAR2(30)
    There are other ways to view execution plans besides issuing the EXPLAIN PLAN statement and querying the plan table. SQL*Plus can automatically display an execution plan after each statement is executed. Also, there are many GUI tools available that allow you to click on a SQL statement in the shared pool and view its execution plan. In addition, TKPROF can optionally include execution plans in its reports as well.
    Trace Files and the TKPROF Utility
    TKPROF is a utility that you invoke at the operating system level in order to analyze SQL trace files and generate reports that present the trace information in a readable form. Although the details of how you invoke TKPROF vary from one platform to the next, Oracle Corporation provides TKPROF with all releases of the database and the basic functionality is the same on all platforms.
    The term trace file may be a bit confusing. More recent releases of the database offer a product called Oracle Trace Collection Services. Also, Net8 is capable of generating trace files. SQL trace files are entirely different. SQL trace is a facility that you enable or disable for individual database sessions or for the entire instance as a whole. When SQL trace is enabled for a database session, the Oracle server process handling that session writes detailed information about all database calls and operations to a trace file. Special database events may be set in order to cause Oracle to write even more specific information—such as the values of bind variables—into the trace file.
    SQL trace files are text files that, strictly speaking, are human readable. However, they are extremely verbose, repetitive, and cryptic. For example, if an application opens a cursor and fetches 1000 rows from the cursor one row at a time, there will be over 1000 separate entries in the trace file.
    TKPROF is a program that you invoke at the operating system command prompt in order to reformat the trace file into a format that is much easier to comprehend. Each SQL statement is displayed in the report, along with counts of how many times it was parsed, executed, and fetched. CPU time, elapsed time, logical reads, physical reads, and rows processed are also reported, along with information about recursion level and misses in the library cache. TKPROF can also optionally include the execution plan for each SQL statement in the report, along with counts of how many rows were processed at each step of the execution plan.
    The SQL statements can be listed in a TKPROF report in the order of how much resource they used, if desired. Also, recursive SQL statements issued by the SYS user to manage the data dictionary can be included or excluded, and TKPROF can write SQL statements from the traced session into a spool file.
    How EXPLAIN PLAN and TKPROF Aid in the Application Tuning Process
    EXPLAIN PLAN and TKPROF are valuable tools in the tuning process. Tuning at the application level typically yields the most dramatic results, and these two tools can help with the tuning in many different ways.
    EXPLAIN PLAN and TKPROF allow you to proactively tune an application while it is in development. It is relatively easy to enable SQL trace, run an application in a test environment, run TKPROF on the trace file, and review the output to determine if application or schema changes are called for. EXPLAIN PLAN is handy for evaluating individual SQL statements.
    By reviewing execution plans, you can also validate the scalability of an application. If the database operations are dependent upon full table scans of tables that could grow quite large, then there may be scalability problems ahead. On the other hand, if large tables are accessed via selective indexes, then scalability may not be a problem.
    EXPLAIN PLAN and TKPROF may also be used in an existing production environment in order to zero in on resource intensive operations and get insights into how the code may be optimized. TKPROF can further be used to quantify the resources required by specific database operations or application functions.
    EXPLAIN PLAN is also handy for estimating resource requirements in advance. Suppose you have an ad hoc reporting request against a very large database. Running queries through EXPLAIN PLAN will let you determine in advance if the queries are feasible or if they will be resource intensive and will take unacceptably long to run.

  • What is the difference between #variable_name and :variable_name?

    Hi!
    What is the difference between #variable_name and :variable_name?
    I have found that if we use alphanumeric variable then :variable_name return value in quotes but #variable_name without quotes.
    Why it does not work in the same way for variable default values when variable is used in filter? (It works in mapping)
    I use variable in filter like T.OUT_DATE>convert(datetime,:LAST_UPDATE_DATE,121)
    When I use my variable in package and do refresh it works fine. But when I try to execute the same interface with variable default value I get error. Seems that variable name has been not changed to the value. It does not work with default value in quotes neither without quotes.
    Any ideas how to solve that?
    Thank you in advance!
    Edited by: user13278245 on Sep 15, 2010 4:34 AM

    Question is how to make it work with default value, when I execute interface standalone, not in package? And why it works in mapping but not in filter?
    + I have found that it works if source is Oracle. It doesn't work only for MS SQL source.
    Edited by: user13278245 on Sep 15, 2010 6:43 AM

  • What is the difference between start() and run()

    Hi:
    what is the difference between start() and the run()???
    in my app, i have
    Console.debug( "starting thread to listen for clients" );
    _server = new Server( this );
    _server.start();
    _server extends Thread..
    why everytime i use server.start(); my app will terminate on it is own, even though in my servr.run() method, i have a while loop
    and if i call _server.run() explicitly in my code, that while loop will be in execution
    can someone let me know??
    thnx

    what is the difference between start() and the
    run()???start() is a method on Thread that tells it to start.
    run() is a method in the object that the thread executes.
    why everytime i use _server.start(); my app will
    terminate on it is own, Err.... I'm not convinced this is true. It'll throw an IllegalThreadStateException, if you try to restart an existing thread.
    If that's what you're saying.
    even though in my _servr.run()
    method, i have a while loopI don't see the connection. Are you saying that the while loop never terminates, and you don't see why the thread is terminating?
    and if i call _server.run() explicitly in my code,
    that while loop will be in executionIf you call server.run() explicitly, then run() will be executed in the same thread that you called it in.

  • What is the difference between exists and in

    hi all
    if i have these queries
    1- select ename from emp where ename in ( select ename from emp where empno=10)
    and
    2- select ename from emp where exists ( select ename from emp where empno=10)
    what is the difference between exists and in is that only when i use in i have to bring the field name or what.... i mean in a complex SQL queries is it will give the same answer
    Thanks

    You get two entirely different result sets that may be the same. Haah! What do I mean by that.
    SQL> select table_name from user_tables;
    TABLE_NAME
    BAR
    FOO
    2 rows selected.
    SQL> select table_name from user_tables where table_name in (select table_name from user_tables where table_name = 'FOO');
    TABLE_NAME
    FOO
    1 row selected.
    SQL> select table_name from user_tables where exists(select table_name from user_tables where table_name = 'FOO');
    TABLE_NAME
    BAR
    FOO
    2 rows selected.So, why is this? the WHERE EXISTS means 'if the next is true', much like where 1=1 being always true and 1=2 being always false. In this case, where exists could be TRUE or FALSE, depending on the subquery.
    WHERE EXISTS can be useful for something like testing if we have data, without actually having to return columns.
    So, if you want to see if an employee exists you might say
    SELECT 1 FROM DUAL WHERE EXISTS( select * from emp where empid = 10);
    If there is a row in emp for empid=10, then you get back 1 from dual;
    This is what I call an 'optimistic' lookup because the WHERE EXISTS ends as soon as there is a hit. It does not care how many - only that at least one exists. It is optimistic because it will continue processing the table lookup until either it hits or reaches the end of the table - for a non-indexed query.

  • 1)Now I use Lightrom 5.7 how to upgrade to 6 or CC? 2) What is the difference between 6 and CC vercion? 3) When I used lightromm 3, I could see inEXIF the distance in meters till the object I took, in the later virsions that function disappeared, it is ve

    1)Now I use Lightrom 5.7 how to upgrade to 6 or CC?
    2) What is the difference between 6 and CC version?
    3) When I used lightromm 3, I could see in EXIF the distance in meters till the object I took, in the later virsions that function disappeared, it is very sad  I am stiil waiting and hope that it would be possibble in the new  versions. Or this indication may  possible by setting?

    1)Now I use Lightrom 5.7 how to upgrade to 6 or CC?
    Purchase the standalone upgrade from here: Products
    Download CC version from here: Explore Adobe desktop apps | Adobe Creative Cloud
    2) What is the difference between 6 and CC version?
    See this comparison chart: Compare Lightroom versions | Adobe Photoshop Lightroom CC
    3) When I used lightromm 3, I could see in EXIF the distance in meters till the object I took, in the later virsions that function disappeared, it is very sad  I am stiil waiting and hope that it would be possibble in the new  versions. Or this indication may  possible by setting?
    Rob Cole's ExifMeta plugin displays the Subject Distance field (and much more).  Unfortunately, his Web site appears to be down again.  He used to be very active here, but he hasn't posted in several months.

  • What's the difference between thunderbolt and mini displayport?

    I'm trying to connect my Macbook with a monitor and I'm thinking of what cable to get. I will have to connect using a (Thunderbolt to HDMI cable) or a (mini displayport to HDMI cable).
    I was wondering what's the difference between Thunderbolt and mini displayport
    Thanks

    @bontistic: it is not true that only the Macbook Air supports Thunderbolt. All models(!) support thunderbolt: also the Macbook Pro's and Mini's. Eg.: http://www.apple.com/nl/macbookpro/features.html#thunderbolt
    My Macbook Pro from 2011 already supported Thunderbolt...

  • What is the difference between, DSO and DTP in BI 7.0

    Hi Guru's
    what is the difference between, DSO and DTP in BI 7.0 , how it will come the data from r/3 to BI 7.0, can u discribe?
    points will be assined?
    Thanks & Regards,
    Reddy.

    Hi,
    The data will be replicated in the same way as we do in 3.5.
    Activating, and Transporting the same DS in BW, and Replicating them in BW from R/3.
    First you need to know Diff b/w 3.5 nd 7.0, for that check the below doc's:
    http://help.sap.com/saphelp_nw04s/helpdata/en/a4/1be541f321c717e10000000a155106/content.htm
    blogs:
    /people/sap.user72/blog/2004/11/01/sap-bi-versus-sap-bw-what146s-in-a-name
    Re: How to identify Header, Item and Schedule item level data sources?
    For Transformations in BI:
    http://help.sap.com/saphelp_nw70/helpdata/en/33/045741c0c28447e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/f8/7913426e48db2ce10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/a9/497f42d540d665e10000000a155106/frameset.htm
    For DTP:
    DTP:
    http://help.sap.com/saphelp_nw70/helpdata/en/20/a894ed07e75648ba5cf7c876430589/frameset.htm
    For DSO:
    Data Store Objects:
    http://help.sap.com/saphelp_nw70/helpdata/en/f9/45503c242b4a67e10000000a114084/frameset.htm
    Reg
    Pra

  • What is the difference between ojvm and client versions?

    Changing the java vm from client to ojvm result in the following error:
    Errormessage:
    java.lang.UnsatisfiedLinkError: no UniqueC in java.library.path
    Project Settings -&gt; Configurations -&gt; Development -&gt; Runner -&gt; Virtual Machine -&gt; ojvm FAILS
    Project Settings -&gt; Configurations -&gt; Development -&gt; Runner -&gt; Virtual Machine -&gt; ojvm      RUNS OK.
    Project Settings -&gt; Configurations -&gt; Development -&gt;Paths -&gt;Additional Classpath:
    C:\jars\xerces.jar;C:\jars\UniqueC.dll;C:\jars\log4j-1.2.8.jar
    What is the difference between ojvm and client versions? How can I make ojvm to find UniqueC.dll?
    Various version info:
    Output from program:
    java version:1.4.2_01
    java home:C:\programfiler\JAVA\2sdk1.4.2_01\jre
    java vm version:9.0.3.738 cdov
    Taken from JDeveloper Help About:
    Oracle IDE     9.0.3.10.35
    UML Modelers Version     9.0.3.9.4
    Business Components Version     9.0.3.10.7
    java.version     1.3.1_02
    java.vm.name     OJVM Client VM
    java.vm.version     9.0.3.738 o

    However, Adobe offers extra paid services to create PDF or to export PDF to other formats. You are not required to buy them, however.

  • What is the difference between TO_CHAR and TO_DATE()?

    Hi everybody,
    i am facing a problem in my system.It is quite urgent, can you explain me "What is the difference between TO_CHAR and TO_DATE()?".
    According to user's requirement, they need to generate a code with format "YYMRRR".
    YY = year of current year
    M = month of current month (IF M >=10 'A' ,M >=11 'B' , M >=10 'C')
    RRR = sequence number
    Example: we have table USER(USER_ID , USER_NAME , USER_CODE)
    EX: SYSDATE = "05-29-2012" MM-DD-YYYY
    IF 10
    ROW USER_ID , USER_NAME , USER_CODE
    1- UID01 , AAAAA , 125001
    2- UID02 , AAAAA , 125002
    10- UID010 , AAAAA , 12A010
    This is the original Script code. But This script runs very well at my Local. Right format. But it just happens wrong format on production.
    12A010 (Right) => 11C010 (Wrong).
    SELECT TO_CHAR(SYSDATE, 'YY') || DECODE( TO_CHAR(SYSDATE, 'MM'),'01','1', '02','2', '03','3', '04','4', '05','5', '06','6', '07','7', '08','8','09','9', '10','A', '11','B', '12','C') ||     NVL(SUBSTR(MAX(USER_CODE), 4, 3), '000') USER_CODE FROM TVC_VSL_SCH                                                       
         WHERE TO_CHAR(SYSDATE,'YY') = SUBSTR(USER_CODE,0,2)                         
         AND TO_CHAR(SYSDATE,'MM') = DECODE(SUBSTR(USER_CODE,3,1),'1','01',          
              '2','02', '3','03', '4','04', '5','05',          
              '6','06', '7','07', '8','08', '9','09',          
              'A','10', 'B','11', 'C','12')                    
    I want to know "What is the difference between TO_CHAR and TO_DATE()?".

    try to use following select
    with t as
    (select TO_CHAR(SYSDATE, 'YY') ||
             DECODE(TO_CHAR(SYSDATE, 'MM'),
                    '01', '1',
                    '02', '2',
                    '03', '3',
                    '04', '4',
                    '05', '5',
                    '06', '6',
                    '07', '7',
                    '08', '8',
                    '09', '9',
                    '10', 'A',
                    '11', 'B',
                    '12', 'C') as code
        from dual)
    SELECT t.code || NVL(SUBSTR(MAX(USER_CODE), 4, 3), '000') USER_CODE
      FROM TVC_VSL_SCH
    WHERE SUBSTR(USER_CODE, 1, 3) = t.codeand yes you need check time on your prodaction server
    good luck
    Edited by: Galbarad on May 29, 2012 3:56 AM

  • What is the difference between upgradation and migration.

    Hi Guru's
    what is the difference between upgradation and migration.
    actuallly i involved in upgradation project, here my role is
    1. first i check the query's in 3.5 save the query and transport the query. and check the query in bex analyzer also.
    2. go to BI .7  find the query;s ,give the query name and save the query ,
    3. once save the query, again will come to 3.5 open the query , it will not open. this is my job here,
        come to 7.0 check the query in analyzer also.
    i am having littile bit confusion, how it will comes query in 7.0, why are u saving the query's in 3.5 and 7.0
    query's already available in 7.0 why are u doing this work?
    can i know the upgrades those  objects, is it neccessary, if necessary how can i upgrade.
    infoobje , transferrules, transferstructure ,infosoure, datasoure,updaterules, ods, cubes.
    Points will be Assingned ,
    Thanks & Regards
    prabhavathi

    Hi,
    I was talking in a general sense not on a query level.
    If your taling about migration in that level meaning as a part of larger upgradation (in your case 3.x to 7) there may be many places where you need to do this kind of activities.
    Fr eg migration into new data flow, Migration of Web templates from BW 3.x to Netweaver 2004s, etc
    Hope this helps.
    Thanks,
    JituK

  • What is the difference  between ws_upload and gui_upload

    what is the difference  between ws_upload and gui_upload
    what is the difference  between ws_download and gui_down load
    pls tell  briefly

    Hi Kuamr,
    UPLOAD and DOWNLOAD, the function modules used until now are not part of the standard set of ABAP commands. They are used to display the file interface on the presentation server. UPLOAD and DOWNLOAD are not compatible with USs and have been replaced by GUI_UPLOAD and GUI_DOWNLOAD.
    The new function modules, GUI_UPLOAD and GUI_DOWNLOAD, have an interface that also allows you to write Unicode format to the local hard drive. For a description of these interfaces, refer to the documentation for each function module, available under SAP Easy Access " Development " Function Builder " Goto " Documentation.
    Instead of using the function modules, you can use the static methods GUI_UPLOAD and GUI_DOWNLOAD of the global class CL_GUI_FRONTEND_SERVICES.
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • What is the difference between count(*) and count(1)

    what is the difference between count(*) and count(1)

    Hi,
    903830 wrote:
    some say count(1) is faster and some say count(*), i am confused about count function?In the link provided by Prakash :
    prakash wrote:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1156159920245
    You can read :
    Followup   August 31, 2001 :
    I'll have to guess, since you don't say, that you are using 7.x and before when count(*) and count(1) were different (and count(1) was slower). In all releases of the databases for the last 4-5 years, they are the same.
    Don't waste your time on that.
    ;-)

  • What is the difference between Service and Component

    What is the difference between Service and Component?

    Generally, the implementation of a service will be comprised of many components, each of which will be comprised of many objects.
    Services should correspond to cohesive collections of use cases (eg an online bank), components are at a finer granularity (eg a table of numbers).
    Pete

  • What's the difference between SNC and SRM?

    we will sell SNC in Q2.But i don't know what is the difference between SNC and SRM.
    i've heard SNC suit Direct procurement better than SRM...
    Pls give me the advice and information.
    good regards kenji

    Hi Kenji,
    SRM is more of Supplier Identification and SNC work of building
    relationship with Supplier starts after this Supplier identification.
    SNC is very Good tool to handover Inventory replenishemnt
    to Suppliers and it gives Visibility of inventory information over Web UI.
    SNC has many processes like PO Collaboration, SMI, DR,DCM, SNI,
    Invoice Collaboration,Release process...to accomplish above mentioned task.
    SNC is designed for direct materials procurement.
    SRM has contract negotiations,bids,auctions for sourcing to identify suppliers
    SRM is good for basic purchasing fuctionality and suitable for indirect materials.
    In addition to all these SNC has Customer Collaboration functionality also.
    Regards,
    Vasu

  • What's the difference between 45Wh and 54Wh battery?

    Hi,
    I was looking for a new battery for my MacBook Aluminum Unibody (Late 2008) and found that there are 45Wh and 54Wh battery. So what's the difference between 45Wh and 54Wh one at the same capacity? Will the 54Wh one offer a longer usage-time?
    Thanks,
    Nathan

    aznjia wrote:
    I wouldn't trust it. Even though the new battery is rated at 54 Watt hour but an apple battery may or may not run up to 1000 cycles. I looked the product reviews on amazon and I will go for what others said. However, Apple battery is designated to last about 700-1000 charge cycles but a battery over than 700 cycles. I am apple battery tech savvy. I would like to share my experience and provide sufficient answers to all the people in this forum.
    I have no idea what you are trying to say. But I am NOT buying or recommending any 3rd party battery. Please read the post.

Maybe you are looking for