PL/SQL 程序将代码分成两部分

问题描述

如何编写一个PL/sql程序将代码分成两部分,如下例所示:如果输入是ABC031,输出应该是:

产品名称是:ABC
序列号为:031

提示:如果需要,请使用以下函数
instr( string1,string2 [,start_position [,nth_appearance ] ] )
substr( string,start_position,[ length ] )
长度(字符串)
DBMS_OUTPUT.PUT_LINE( )

解决方法

这里有两个例子,看看是否有帮助。

array:6 [
  0 => {#985
    +"id": 7
    +"block_id": 140
    +"ha": 2.5 // correct
  }
  1 => {#983
    +"id": 66
    +"block_id": 809
    +"ha": null // correct
  }
  2 => {#988
    +"id": 67
    +"block_id": 152
    +"ha": null // correct
  }
  3 => {#1021
    +"id": 68
    +"block_id": 143
    +"ha": 4.3 // correct
  }
  4 => {#1022
    +"id": 69
    +"block_id": 149
    +"ha": 3.5
  }
  5 => {#1023
    +"id": 70
    +"block_id": 673
    +"ha": 2.53 // correct
  }
]