PL/SQL 001
在 Oracle 10g 中
可以通过 http://localhost:5560/isqlplus 访问 isqlplus
在 isqlplus 中 可以执行 plsql
set serveroutput on size 100000 // 打开 服务器的输出 on 后面是 缓存的大小 范围是 (2000 至 1000000)
begin
dbms_output.put_line('hello world');
end;
相关文档:
Introduction
Microsoft SQL Server 2008 R2 is the latest release of SQL Server. This article will introduce the top 10 features and benefits of SQL Server 2008 R2. The “R2” tag indicates this is an intermediate release of SQL Server and not a major revision. However, there are a number o ......
1.集合操作
学习oracle
中集合操作的有关语句,
掌握union,union
all,minus,interest的使用,能够描述结合运算,并且能够将多个查询组合到一个查询中去,能够控制行返回的顺序。
包含集合运算的
查询称为复合查询。见表格1-1
表1-1
Operator Returns &nb ......
SQL语句的处理
ps:MSDN摘
优化 在基础表上(不引用视图或远程表)的 SELECT 语句:SELECT 语句是非程序性的,这意味着数据库服务器必须分析语句,以决定提取所请求数据的最有效方法
处理上面步骤的组件称为“查询优化器”:
输入:查询、数据库方案(表和索引的定义)以及数据库统计信息
& ......
向表中添加一个新记录,你要使用SQL INSERT 语句。
这里有一个如何使用这种语句的例子:
INSERT mytable (mycolumn) VALUES (‘some data’)
这个语句把字符串’some data’插入表mytable的mycolumn字段中。将要被插入数据的字段的名字在第一个括号中指定,实际的数据在第二个括号中给出。
I ......
1.显示本月第一天
SELECT DATEADD(mm,DATEDIFF(mm,0,getdate()),0)
select convert(datetime,convert(varchar(8),getdate(),
120)+’01’,120)
2.显示本月最后一天
select dateadd(day,-1,convert(datetime,convert
(varchar(8),dateadd(month,1,getdate()),120)+’01’,120))
SELECT ......