惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 聂微东
博客园_首页
M
MIT News - Artificial intelligence
Project Zero
Project Zero
C
CXSECURITY Database RSS Feed - CXSecurity.com
V2EX - 技术
V2EX - 技术
G
Google Developers Blog
H
Hacker News: Front Page
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
GbyAI
GbyAI
C
Cisco Blogs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
酷 壳 – CoolShell
酷 壳 – CoolShell
The Hacker News
The Hacker News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Simon Willison's Weblog
Simon Willison's Weblog
A
Arctic Wolf
H
Heimdal Security Blog
量子位
小众软件
小众软件
Help Net Security
Help Net Security
博客园 - Franky
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
N
News | PayPal Newsroom
T
Tor Project blog
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog
N
News and Events Feed by Topic
T
Tailwind CSS Blog
Webroot Blog
Webroot Blog
J
Java Code Geeks
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
罗磊的独立博客
The Register - Security
The Register - Security
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
有赞技术团队
有赞技术团队
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
腾讯CDC
P
Palo Alto Networks Blog
S
Secure Thoughts
D
Darknet – Hacking Tools, Hacker News & Cyber Security
TaoSecurity Blog
TaoSecurity Blog
Scott Helme
Scott Helme
T
Tenable Blog
C
Cybersecurity and Infrastructure Security Agency CISA
D
Docker
美团技术团队

博客园 - YiStudio

在Word中插入图片 DataGridView多列排序 将Word嵌入到自己的程序中 一个非常不错的压缩组件 免费的国产报表Grid++Reprot 使用NSIS制作安装包(2) 使用NSIS制作安装包(1) SharpDevelop2.0 用Firebird .NET Data Provider编写.NET应用程序(2) 用Firebird .NET Data Provider编写.NET应用程序(1) 用Marathon管理Firebird数据库(1) Firebird简介 NDoc修改手记(三) NDoc修改手记(二) NDoc修改手记(一) WebForm中将DataGrid中导出数据的方法 FxCop EXCEL2003中使用XML 动态加载类(动态加载DLL文件)
用Marathon管理Firebird数据库(2)
YiStudio · 2005-07-08 · via 博客园 - YiStudio

使用Marathon创建表可以通过可视化的界面来完成,但要创建视图就不像使用SQL Server 2000企业管理器创建视图那样方便了,而是要通过编写SQL语句来完成,这就要求我们必须对标准的SQL语言掌握的很好。

下面是创建一个视图的SQL语句
    create view V_2 (F1,F2,F3,F4,F5)
    as
    select T_1.C1,T_1.C2,T_1.C3,T_2.C1,T_2.C3 from T_1,T_2
    where T_1.C1=T_2.C2

在SQL Server 2000中编写触发器时,inserted和deleted是会被经常用到的,而在Firebird中它们变成了new和old。还有一点与SQL Server 2000不同的是Firebird将触发器分成了六种(before insert,after insert,before update,after update,before delete,after delete),这样我们在编写Firebird触发器时就可以更加自如的控制触发器执行的时间了。

下面是一个简单的after insert触发器
    create trigger TR_1 for T_1 active after insert position 0
    as
    begin
        insert into T_2 values((select max(C1) from T_2)+1,new.C1,new.C3);
    end
 
接下来,我们看看Firebird中的存储过程
    create procedure SP_1_ADD (
                     F1 integer,
                     F2 date,
                     F3 varchar(40) character set GB_2312)
    as
    begin
        insert into T_1 values(? /* F1 */ ,? /* F2 */ ,? /* F3 */ );
    end
这是一个简单的插入记录的存储过程。它与我们在SQL Server中创建的存储过程有着很大的区别,首先是在存储过程参数的声明上,其次是在使用参数的时候,Firebird数据库使用的是占位符?。