lunes, 2 de diciembre de 2013

IF condiciones

IF SIMPLE


DECLARE
p1 VARCHAR(20):= 'jose';
p2 VARCHAR(20):= 'Alberto';

BEGIN

  IF (p1 = p2) THEN
    DBMS_OUTPUT.PUT_LINE('Son iguales');

  ELSIF (p1 = 'Alberto') THEN
    DBMS_OUTPUT.PUT_LINE('Se llama como yo');
    
    ELSE
      DBMS_OUTPUT.PUT_LINE('Son diferentes');
  END IF;
  
END;

No hay comentarios:

Publicar un comentario