PL/SQL怎么判断2个字符串变量是否相等
1个回答
展开全部
Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
Connected as XXX
SQL> set serveroutput on
SQL> set timing on
SQL> declare
2 v_1 varchar2(30) := '';
3 v_2 varchar2(30) := '';
4 begin
5 v_1 := 'good';
6 v_2 := 'good';
7 if v_1 = v_2 then
8 dbms_output.put_line('equal');
9 else
10 dbms_output.put_line('not equal');
11 end if;
12 end;
13 /
equal
PL/SQL procedure successfully completed
Executed in 0.797 seconds
SQL>
Connected as XXX
SQL> set serveroutput on
SQL> set timing on
SQL> declare
2 v_1 varchar2(30) := '';
3 v_2 varchar2(30) := '';
4 begin
5 v_1 := 'good';
6 v_2 := 'good';
7 if v_1 = v_2 then
8 dbms_output.put_line('equal');
9 else
10 dbms_output.put_line('not equal');
11 end if;
12 end;
13 /
equal
PL/SQL procedure successfully completed
Executed in 0.797 seconds
SQL>
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询