主要看了下数据库的设计,还有巩固了下基本语法(赋值、运算符、类型等),多看几遍,虽然实践的少,也能慢慢熟了。 1、MSSQL用SELECT赋值,是用等号,ORACLE是用INTO 2、MSSQL的IF比较习惯,ORACLE要IF XX THEN XXX ELSIF XX THEN XXX ELSE ...
分类:
数据库 时间:
2016-10-13 01:51:30
阅读次数:
228
Oracle 中 decode 函数用法 含义解释:decode(条件,值1,返回值1,值2,返回值2,...值n,返回值n,缺省值) 该函数的含义如下:IF 条件=值1 THEN RETURN(翻译值1)ELSIF 条件=值2 THEN RETURN(翻译值2) ......ELSIF 条件=值n ...
分类:
数据库 时间:
2016-08-23 23:42:02
阅读次数:
382
=begin
条件判断语句包括if语句,unless语句,case语句,
=end
#if语句
=begin
if条件then
处理1
elsif条件2then
处理2
else
处理3
end
=end
a=10
b=20
ifa>b
puts"abiggerthanb"
elsifa<b
puts"asmallerthanb"
else
puts"aisequaltob"
end
puts"abiggerthanb"ifa>b
..
分类:
其他好文 时间:
2016-05-18 22:12:44
阅读次数:
203
6)if判断语句 if ... then else end if; if ... then elsif ... then elsif ... then else end if; declare sex char(1) := 'M'; begin if sex='M' then dbms_output ...
分类:
其他好文 时间:
2016-05-16 14:12:05
阅读次数:
120
一、IF语句
在PL/SQL中,if, then, else, elsif, endif等关键字用来执行条件逻辑
语法格式:
if 条件1 then
语句1
elsif 条件2 then
语句2
else
语句3
end if;
例1:练习if结构
解:注意下图中的程序:
二、case语句
...
分类:
数据库 时间:
2016-04-15 12:04:12
阅读次数:
219
注释单行注释就是 #多行注释比较奇怪是 用 = begin 和 =end#!/usr/bin/ruby -w
puts "Hello, Ruby!"
=begin
这是一个多行注释。
可扩展至任意数量的行。
但 =begin 和 =end 只能出现在第一行和最后一行。
=end条件判断if conditional [then]
code...
[elsif conditional [t...
分类:
其他好文 时间:
2015-12-22 01:17:16
阅读次数:
247
if...then...elsif实现多分支判断语句其语法如下:if thenplsql_sentence_1;elseif thenplsql_sentence_2;...elseplsql_sentence_n;end if;最后一个else后边是没有条件的,这个比较重要。具体示例:decla....
分类:
数据库 时间:
2015-12-17 20:39:40
阅读次数:
244
1 create or replace procedure pr_test1 is 2 begin 3 4 if 2 > 1 then 5 6 7 dbms_output.put_line('条件成立'); 8 9 elsif 4 > 3 th...
分类:
数据库 时间:
2015-11-01 13:58:06
阅读次数:
271
--创建函数create or replace function add_sal(sSal number) return numberisbegin if (sSal > 5000) then return sSal + 51; elsif (sSal > 3000) then...
分类:
数据库 时间:
2015-10-13 00:07:49
阅读次数:
175
oracle中的decode的使用Oracle 中 decode 函数用法含义解释:decode(条件,值1,返回值1,值2,返回值2,...值n,返回值n,缺省值) 该函数的含义如下:IF 条件=值1 THEN RETURN(翻译值1)ELSIF 条件=值2 THEN RETURN(...
分类:
数据库 时间:
2015-09-07 11:04:15
阅读次数:
192