Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2010
    Posts
    4

    String Comparison in PL/SQL

    Hi,

    I want to compare two strings

    str1 VARCHAR2(10);
    str2 VARCHAR2(10);

    if they are equal perform some operation?

    Could any one tell me how to do it using Oracle pl/SQL??

    Thanks in advance

  2. #2
    Join Date
    Aug 2009
    Location
    Olympia, WA
    Posts
    337
    Really? This is a RTFM question. Are you sure you weren't looking for the mysql forum?
    Code:
    IF str1 = str2 THEN
      dbms_output.put_line('Read the fine manual');
    ELSE
      dbms_output.put_line('Or dont');
    END IF;

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,005
    Eh, "dont". Why didn't you provide an example of correct use of a single quote? Did you think that it would be too much for the first lesson?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •