pl/sql实现打印九九乘法表
学习PL/SQL循环的时候写的,记录一下。
declare
v_number1 number(3); -- 外层循环变量
v_number2 number(3); -- 内层循环变量
begin
for v_number1 in 1..9 -- 开始外层循环
loop
for v_number2 in 1 .. v_number1 -- 开始内层循环
loop
dbms_output.put(rpad(v_number1||'*'||v_number2||'='||v_number1*v_number2,8,' '));
end loop;
dbms_output.put_line(''); -- 换行
end loop;
end;
必要的注释都添加了,语法其实也不难。
"孤独是一个人的狂欢,狂欢是一群人的孤独。"
pl/sql实现打印九九乘法表的更多相关文章
- scala打印九九乘法表的5种实现
使用scala打印九九乘法表,可以有多种实现方法,实现的过程充分的体现的scala语言的优势和巨大的简洁性和高效性, 下面我用了5种方法实现九九乘法表. 使用类似于java,c++等指令风格的的编程实 ...
- C#打印九九乘法表
C#打印九九乘法表... ---------------------------------- using System; using System.Collections.Generic; usin ...
- 利用Python循环(包括while&for)各种打印九九乘法表
一.for循环打印九九乘法表 #注意:由于缩进在浏览器不好控制,请大家见谅,后续会有图片传入. 1.1 左下角 for i in range(1,10): for j in range(1,i+1): ...
- 写一个方法,用一个for循环打印九九乘法表
public class MultiplicationTable { /** * @description 写一个方法,用一个for循环打印九九乘法表 * @author wangkun * ...
- python脚本7_打印九九乘法表
#打印九九乘法表 for i in range(1,10): s = "" for j in range(1,i+1): s += str(j) + '*' + str(i) + ...
- python—用for循环、while循环和一句话打印九九乘法表
用for循环打印九九乘法表: for i in range (1,10): for j in range(1,10): print(j,"x",i,"=",i* ...
- 【Java】Java_15 打印九九乘法表
使用For循环嵌套即可打印九九乘法表 以下是具体代码: /** * 打印九九乘法表 */ package com.oliver.test; public class TestMultiplicatio ...
- 使用whIle循环语句和变量打印九九乘法表
-设置i变量declare @i int --设置j变量declare @j int --设置乘法表变量declare @chengfabiao varchar(1000)--给i,j,@chengf ...
- python3 打印九九乘法表
打印九九乘法表 # !/usr/bin/env python # -*- coding:utf-8 -*- # Author:Hiuhung Wan for i in range(1, 10): fo ...
随机推荐
- Announcing the Updated NGINX and NGINX Plus Plug‑In for New Relic (Version 2)
In March, 2013 we released the first version of the “nginx web server” plug‑in for New Relic monitor ...
- Custom partition assignment and migration kafka集群扩充迁移指定partition
The partition reassignment tool can also be used to selectively move replicas of a partition to a sp ...
- 安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(一)转载自码农网
CentOS 是一个工业标准的 Linux 发行版,是红帽企业版 Linux 的衍生版本.你安装完后马上就可以使用,但是为了更好地使用你的系统,你需要进行一些升级.安装新的软件包.配置特定服务和应用程 ...
- 文件IO模型
In case of kernel-space network drivers, all three regions are mapped to kernel space, and any acces ...
- 关于 chrome canary X64 在 win7 64bit 下面缺少openvr_api.dll的解决方法
在github上下载openvr_api.dll放到chrome的安装目录下就可以. 其实放到系统目录下最好,以后其他程序要使用的时候也能使用的到. https://github.com/ValveS ...
- 转://Oracle not in查不到应有的结果(NULL、IN、EXISTS详解)
问题: 语句1 : Select * from table1 A where A.col1 not in ( select col1 from table2 B ) ...
- 【移动端】单位em相关资料
https://www.cnblogs.com/koubazhuanshu/p/6985331.html https://www.w3cplus.com/css/px-to-em 不建议使用 作者:s ...
- Python 在 Terminal 中的自动补全
为了在 Terminal 中使用 Python 更加方便,在 home 目录下添加脚本 .pythonstartup,内容如下, 然后在 .bashrc 中添加 export PYTHONSTARTU ...
- Libinput 1.13 RC2发布
Red Hat的Peter Hutterer周四宣布发布libinput 1.13 RC2,作为X.Org和Wayland Linux系统使用此输入处理库的最新测试版本. Libinput 1.13将 ...
- Volley使用
Volley是常用的网络请求框架,主要的用法如下: 获取字符串: public static void volleyTest1(final Context context){ RequestQueue ...