Difference between and != operators

Hi All,
My question may be very basic to you all
Please let me know the difference between <> and != operators
Thanks in advance

user609996 wrote:
Sorry to all,
the operator "<>" is not printed
I want the difference between "<>" and "!=" operators.And as you've already been told there is no difference between the &lt;&gt; and != operators. They mean the same thing, but are just different representations of it.
The only difference is that the Oracle forum can't display &lt;&gt; if it is just typed in normally. To show it we have to type &lt and &gt with a ";" after each.

Similar Messages

  • Difference between & and && operators in if.

    Hi,
    this question seems like silly, but I am confused when I used these two operators in "if "condition,
    is these 2 operators are act like same in if statement. like for example
    if( 10 == 10 & "a".equals("a")){
    System.out.print("true");
    if( 10 == 10 && "a".equals("a")){
    System.out.print("true");
    when I executed above statements both printing true.
    Can you please clarify on this.
    Thanks in advance

    Usually true, but not entirely accurate. the single & operator is also used for boolean And, but it does not short circuit the evel. try this code ofr a test
    String s = null;
         String l = "l";
         if(s == null && l.equals("l") )
             System.out.println("test 1");
         if(l.equals("a") && s.length() > 0)
             System.out.println("test 2");
         else
             System.out.println("Short circuited, l != a");
         try{
         if(l.equals("a") & s.length() > 0)
             System.out.println("test 3");
         catch (NullPointerException npe)
             System.out.println("Silly programmer, s is null");
         }~Tim

  • Difference between & and && operater   and  difference between and

    what is difference between & and && oprater in java
    and what is difference between << and <<< operater

    i am sorry i dont know about << ,<<<< There isn't a <<< operator.
    However I presume the operator being referred to is >>>
    They are bit shifting operators.
    In fact its the [url http://java.sun.com/docs/books/tutorial/java/nutsandbolts/bitwise.html]very next page of the tutorial linked to above.
    << == left shift
    == right shift,
    == right shift (unsigned)
    Cheers,
    evnafets

  • Query using BETWEEN/AND operators

    Im trying to query in forms using BETWEEN/AND operators. The field is for dates (YYYY) is stored in the DB as varchar (4). My code compiles but returns nothing...Any ideas of whats wrong...
    PROCEDURE YR_RANGE_SEARCH IS
    BEGIN
    IF :SEARCH.NRA_START IS NOT NULL
    AND :SEARCH.NRA_END IS NOT NULL THEN
    :Global.BUFFER_START := :SEARCH.NRA_STRT;
    :Global.BUFFER_END := :SEARCH.NRA_END;
    BEGIN
    SET_BLOCK_PROPERTY('NRHR', ONETIME_WHERE, 'NRHR.YEAR = ''' || 'BETWEEN' || :Global.BUFFER_START || 'AND' || :Global.BUFFER_END ||'''');
    GO_BLOCK('NRHR');
    EXECUTE_QUERY;
    END;
    END IF;
    END;

    check spaces in quoted text. i noticed that in your original query you had no spaces anywhere which made your ONETIME_WHERE resulting in something like NRHR.YEAR='BETWEEN2005AND2007' (if :Global.BUFFER_START=2005 and :Global.BUFFER_END=2007). For sure that always resulted in NULL value returned by the query;
    in my answer
    SET_BLOCK_PROPERTY('NRHR', ONETIME_WHERE, 'NRHR.YEAR BETWEEN '|| :Global.BUFFER_START || ' AND ' || :Global.BUFFER_END);
    there is a space after BETWEEN and space before and after AND. Be careful.

  • Difference between " " and ' ' in oracle

    Hi
    What is the difference between " " and ' ' in oracle

    Generally, single quotes ' are used as string delimiters. Double quotes are NOT string delimters in SQL, but are used to preserve the precise representation of what's enclosed - for instance, "abc" would be recognized as lowercase in situations where SQL would automatically translate them into upper case. Thus, something like
    SQL> select dummy as "dummy"
      2    from dual;
    d
    Xmeans to select the dummy column but preserve the name in lower case where normally the 'd' in the column name (cut off) would be 'D'
    Using empty strings to represtent nulls has already been discussed on this thread. Remember that spaces are NOT nulls. I personally find the replace-null-with-space method a bit clunky, but a lot of mainframe-to-oracle conversions use it.

  • Please tell basic difference between "" and null  for String  variable.

    1.What is difference between String strRemitInfo = "" and String strRemitInfo = null?
    2. Which one is good practice while coding ?

    1.What is difference between String strRemitInfo = ""
    and String strRemitInfo = null?Emptry string and nul reference
    >
    2. Which one is good practice while coding ?Depends on what you want to do.

  • Whats the difference between and Album and a Smart Album

    OK, just upgraded.... So, whats the difference between an Album and a Smart Album?  
    Also, I like to organise my stuff, so if I create a folder for each year, and then a project within that year, why is it that the photos are always in both - and then again if I chose to create an album specific to a project, they are there again.
    So it might look:
              Folder (2012 Equine Photography)
                   Project - Specific Events
                        Album - Big Barn Dressage May
    Does this mean the individual photo is stored 3 times and using 3 times the space?
    Thanks guys!

    Mrsthebraggster wrote:
    So it might look:
              Folder (2012 Equine Photography)
                   Project - Specific Events
                        Album - Big Barn Dressage May
    Does this mean the individual photo is stored 3 times and using 3 times the space?
    No. Conceptually the Master only lives lives in the single (time based) Project you import it into. Albums are just collections of pointers that point to  images in various Projects.
    "Big Barn Dressage May" could be a Project, but only if it is only one day and a limited number of image files; otherwise an Album. "2012 Equine Photography" should be an album or a Folder of Albums. "Specific Events" could be an Album or a Folder of Albums.
    A Project should not be used as a Folder.
    From an earlier post of mine:
    Folders are indeed flexible organizational tools but IMO often overused. Folders can effectively hide contents from view and therefore require users to remember how folders are nested and what is inside them. Folders were the only way to deal with single-original film, but are IMO limiting to image database thinking.
    The way I look at it conceptually:
    Aperture is a database (DB), and each image file lives in one Project.
    Albums are just collections of Pointers that point to individual image files living in one or more Projects. Since they just contain pointers, albums can be created or deleted at will without affecting image files. Very powerful. And Albums of pointers take up almost zero space, so they are fast and do not make the Library size grow.
    Keywords can be applied to every image separately or in batches. Keywords are hugely powerful and largely obviate the need for folders. Not that we should never use folders, just that we should use folders only when useful organizationally - - after first determining that using keywords and albums is not a better approach.
    As one example imagine the keyword "flowers."  Every image of a 100,000 images Library that has some flowers in it has the keyword flowers. Then say we want to put flowers in an ad, or as background for a show of some kind, or to print pix for a party, or even just to look for an image for some other reason. We can find every flower image in a 100k-image database in 2 seconds, and in another few seconds create an Album called "Flowers" that points to all of those individual images.
    Similarly all family pix can have a keyword "family" and all work pix can have a key word "work." Each individual pic may have any number of keywords. Such pic characteristics (work, family, flowers, etc.) should not be organized via folders.
    So by using keywords and albums we can have instant access to every image everywhere, very cool. And keywords and albums essentially take up no space in the database.
    Another approach is to use a folder "Family" for family pix, a folder "Flowers" for flowers pix and another folder "Work" for work pix. IMO such folders usage is a very poor approach to using an images database (probably stemming from old paper or film work practices). Note that one cannot put an image with family in a field of flowers at a work picnic in all three folders; but it is instant with keywords.
    HTH
    -Allen

  • Difference between and lock and eneque in oracle

    Please give the difference between a lock and eneque in oracle
    Naveen

    Here is what Oracle defines an Enqueue to be in the 9.2 Glossary >>
    enqueue
    Shared memory structures that serialize access to database resources. Enqueues are local to one instance if Real Application Clusters is not enabled. When you enable Real Application Clusters, enqueues can be local or global to a database. (See also: latch, lock, and resource.)
    <<
    There is also a type of enqueue associated with Advanced Queueing. Similar concept but different specialized purpose.
    Generally speaking Locks on the other hand serialize access to row data. Oracle actually records row locks in the data blocks.
    Enqueues, Locks, and Latches are perform the same basic function: serialize access but the methods are implemented differently and applied to different functional areas of the rdbms.
    HTH -- Mark D Powell --

  • Difference between ';' and '/' in the SQL scripts

    Hi All,
    Could anyone please let me know the difference between placing ';' and '/' in the sql scripts.
    I am placing couple of insert statements in a textfile with .sql extension and running it from the sql prompt.
    Which one( ';' or '/') should be keep at the end of each statement in the script.
    SQL> SELECT SYSDATE FROM DUAL;
    SYSDATE
    12-MAY-13
    SQL> SELECT SYSDATE FROM DUAL
      2  /
    SYSDATE
    12-MAY-13Thanks,

    968217 wrote:
    My doubt is how it understands or the difference b/w the below two view statements one with ';' and another one with '/'. Sorry if i am unclear.They are identical in SQL*Plus. These characters mean "+send entered/buffered text to Oracle to parse and execute+".
    So - SQL*Plus sends "+create or replace view ev1 as select ename , sal from emp+" to the server (via a cursor execute):
    create or replace view ev1 as select ename , sal from emp
    /And again, SQL*Plus sends "+create or replace view ev1 as select ename , sal from emp+" to the server (via a cursor execute):
    create or replace view ev2 as select ename , sal from emp;These are identical statements.
    As I mentioned in the post I referred you to. Oracle also uses the ";" character in the PL/SQL language. So when you enter PL/SQL code in SQL*Plus, you do not want SQL*Plus to send each line of PL/SQL code to the server. Instead, you want it to wait till the last statement has been entered and then send the the whole block to the server to be parsed and executed,
    SQL*Plus has a basic parser itself. It uses that to figure out what you have entered, and whether a ";" you enter is an instruction from you to it, to send the text to the server - or when you enter a ";", it is part of the text for the server and that it should not react to it.
    Thus when you enter the following, SQL*Plus recognises that you are using the SQL language, and as this language does not use ";" characters, a ";" character when entered means that it needs to send the text to the server to be parsed and executed:
    SQL> select * from emp;
    // ; character instructs SQL*Plus to create and execute cursor "select * from emp"When you enter PL/SQL code, SQL*Pus recognises that and knows that ";" characters entered indicates end-of-statement for PL//SQL and that it should not act on that,
    SQL> begin
      2    null;
      3  end;
      4  /
    // SQL*Plus ignores the ";" character - and the "/" character is used to
    // instruct SQL*Plus to create and execute cursor"begin<LF>null;><LF>end;"

  • Difference between * and ALL field values?

    Greetings to all,
    Here is an intresting question. For a particular authorization object of a role, I see that it has a field value of ALL for a specific field. Is this same as * or is there any subtle difference between the two. This is in ECC 5.0.I would greatly appreciate a discussion. Thanks.

    i have also seen the value ALL in some roles in my org...
    Object:C_PRPS_USR (PS: Model for User Field Authorization for WBS elements)
    Field:USR10_1 (User field with 10 characters)
    Value: ALL
    If ALL means value ALL then what is the significance of it in the above field?
    Pls throw some light...
    thankx
    Sachin

  • Difference between - and = in OOABAP?

    Hi all,
       I want to know the use of => and -> Operators in OOPs.
    Thanks,
    Suresh

    Hi Suresh,
    The -> operator is used to access instance attributes and methods of a class
    The => operator is used to access static attributes  and methods of a class.
    The static attributes  & methods can be directly accessed as class_name=>attribute or class_name=>method( ).
    The instance attributes & methods can be accessed only via object references of classes like, oref->attribute, oref->method( ).
    Hope it helps,
    Regards, Sudeep..

  • Difference between ' and " in tags

    I see some people posting code with tag library tags using ' (single quote) around attributes sometimes. Is there a functional difference between the 2 styles like in Perl, or is it like Javascript where it doesn't matter, or is this just typing mistakes?

    Yes, yes, that's like Javascript/HTML, so things aren't confused. But what is this action, cuz the taglib tags would be pulled out on the server before the browser sees it...
    Are you meaning (taglib in plain HTML):
    <form action="<bean:write name='beanname' property='propname' />">...</form>
    or are you meaning you can do this (nested taglib tags):
    <html:form action="<bean:write name='beanname' property='propname' />">...</html:form>
    ?? Cuz I've do this with no problems:
    <form action="<bean:write name="beanname" property="propname" />">...</form>

  • Differences between == and .equals

    I'm rather new to Java programming and have learned that == can only be used to compare primitive types in Java (for example when comparing to int) and when comparing objects, one should use the .equals-method (that should be overloaded from the one in Object). This is because == compare the object's reference adress (is this correct?) For example:
    Vector v1 = new Vector();
    Vector v2 = new Vector();
    v1.add("hello");
    v2.add("hello");
    System.out.println(v1 == v2);This program should print false, since v1 and v2 are different objects.
    System.out.println(v1 == v1);should print true.
    OK, so far so good. However, an experiment I've made clearly shows that there's an exception to this rule. When comparing objects of type String, you don't need to use .equals, == works perfectly. My question is why?

    When comparing objects of type String, you
    don't need to use .equals, == works perfectly. My
    question is why?It doesn't work perfectly at all.
    String literals
    Don't confuse String's equals() method with the equality operator '=='. The == operator checks that two references refer to the same object. If you want to compare the contents of Strings (whether two strings contain the same character sequence), use equals(), e.g. if (str1.equals(str2))...
    Example:String s1 = "foo";
    String s2 = new String("foo");
    System.out.println("s1 == s2: " + (s1 == s2)); // false
    System.out.println("s1.equals(s2): " + (s1.equals(s2))); // trueFor more information, check out Comparison operators: equals() versus ==

  • [Solved] Shell: Is there a difference between / and // in directories?

    Hello:
    I'm making this tiny program in Shell:
    # Function.
    # NAME: chk_df
    # Synopsis:
    # Check if a local directory (dirName) exist and has a file (fileName).
    # The return codes are the following:
    # 99 : dirName does not exists
    # 0 : dirName exists and has fileName
    # 1 : dirName exists and has not fileName
    # Parameters:
    # In values: dirName <string> fileName <string>
    # Out values: returnCode <int>
    # How to use:
    # chk_df dirName fileName
    chk_df(){
    # Check the number of arguments that could be passed.
    # In this case, two, dirName, fileNAme.
    if [[ ${#@} != 2 ]]; then
    echo "Error ...Use [Funtion]: chk_df <dirName> <fileName>"
    echo "Ex: chk_df /foo lola.txt"
    exit
    fi
    DIR=$1
    FILE=$2
    [[ ! -d $DIR ]] && return 99
    [[ -d $DIR && ! -e $DIR/$FILE ]] && return 1
    [[ -d $DIR && -e $DIR/$FILE ]] && return 0
    Because I need to check if a file is in a directory, I did this (horrible?) patch $DIR/$FILE , but things like this could happen:
    I) If we do: chk_df /foo lola.txt
    We get: /foo/lola.txt
    II) If we do: chk_df /foo/ lola.txt
    We get: /foo//lola.txt [Notice the //]
    In both cases the code seems to work. Why?
    Could I leave it like that or it will bring problems? Is there a difference? UNIX assume it to the right way?
    EXTRA QUESTION: why I can not do the returns with negative numbers? This is:   return -1
    Thank you.
    Last edited by gromlok (2011-11-07 15:48:44)

    If this script is bash only, you could use bash parameter expansion to get rid of any number of //:
    $ DIR="/long//numerous//doubleslashed/path/to/"
    $ FILE="file"
    $ MYPATH="$DIR/$FILE"
    $ cd $MYPATH
    bash: cd: /long//numerous//doubleslashed/path/to//file: No such file or directory
    $ cd ${MYPATH//\/\//\/}
    bash: cd: /long/numerous/doubleslashed/path/to/file: No such file or directory
    See http://mywiki.wooledge.org/BashGuide/Pa … _Expansion if you want a better explanation.
    Edit: changed variable name from PATH to MYPATH.  Boy was I surprised by bash: pacman: command not found
    Last edited by alphaniner (2011-11-07 17:26:02)

  • Difference between = * and *=

    Could anyone of you tell a reason why the following behave so.
    Line 1: short s1 = 2, s2 = 3;
    Line 2: s1 *= s2;
    Line 3: System.out.print(s1);
    Line 4: s2 = s2 * s1;
    Line 5: System.out.print(s2);
    Compilation error at Line 4 is the result. Line 4 will get the compilation error, since operation performs in int (32-bit), and is trying to assign to a short (16-bit). OK. But the question is why the rule is not applicatble to Line 2? If ! comment out line 4 and 5, it will compile, run and print "6". Can anyone tell the reason or tell me how java implemented these assign operators?
    Thanks in Advance,
    Sameer B.

    Wow, most people just go, holy crap.. I don't ever want to see that byte code crap again...
    Here's how I did that one.
    make a file Test.java
    public class Test {
    public static void main(String[] args) {
       short s1=2, s2=3;
       s1 *= s2;
       System.out.println( s1 );
    }compile it.
    javac Test.javause javap on it
    javap -c -classpath . TestIt will spit out the byte code. Note that what I included above was just part of the main methods byte code. I knew what I was looking for. There is some extra stuff in the full dump, like a constructor and the static call to println.

Maybe you are looking for

  • Problems while writing xml doc to a  file

    Hi all , in my project (of distributed xml databases) i need to write the xml files from the main server to the clients. These xml files i had formed by fragmenting one xml doc and i did the fragmentation using .... TransformerFactory tf = Transforme

  • Multiple ODBC drivers in W2K

    Is there any known problems with having 2 different version of the Oracle ODBC driver installed on one Windows 2000 client? I have the 8.1.7 driver and the 9.2.54 driver installed. When I attempted to set up an ODBC data source for the 8.1.7 driver,

  • Lightroom 5 won't install on my Mac...

    All is well until I put in the serial number. Then when I click "Finish", everything just disappears and Lightroom shuts down. No error messages. No freezing. It just vanishes. The serial number is correct, btw. I see the green check icon after typin

  • Yet another slow speed thread....

    Every so often I have issues with the speeds pertaining to my two BT Broadband lines into my house. So here we go again, I've problems with one of the lines which for my rural village location usually nets very good results... Normally I get this :-

  • Over Delivery Block

    Respected Friends, i have Scenario that my Organization Want to Block Over Delivery Mean That: the Quantity in the Sales Order Must be equal to Delivery Quantity. For Example: Sales Order Quantity : 10 Kg Delivery Quantity : Must Not Be be greater 10