注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

_

_

 
 
 

日志

 
 

informix sql server  

2012-09-13 21:24:57|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

库表语句:
??? informix:?? databasename:tablename
??? sql?? server:?? databasename.tablename
建表语句:
??? informix:?? not?? null?? default?? ...
??? sql?? server:?? default?? ...?? not?? null
建临时表语句:
??? informix:?? create?? temp?? table?? ...
??? sql?? server:?? create?? table?? #...?? (局部)
??? sql?? server:?? create?? table?? ##...?? (全局)
默认值:
??? informix:?? CURRENT
??? sql?? server:?? CURRENT_TIMESTAMP
??? informix:?? TODAY
??? sql?? server:?? (getdate())
自动生成唯一值:
??? informix:?? serial
??? sql?? server:?? 类型+IDENTITY(1,1)
空值:
??? informix:?? 不用指定
??? sql?? server:?? 首先执行SET?? ANSI_NULL_DFLT_ON?? ON
语句分隔符:
??? informix:?? ;
??? sql?? server:?? GO
查询到临时表:
??? informix:?? SELECT?? FROM?? WHERE?? INTO?? TEMP...
??? sql?? server:?? SELECT?? ...?? INTO?? #...?? FROM?? WHERE?? (临时表)
??? sql?? server:?? SELECT?? ...?? INTO?? ...?? FROM?? WHERE?? (正式表)
查询到变量:
??? informix:?? SELECT?? ...?? INTO?? VAR1...?? FROM?? WHERE
??? sql?? server:?? SELECT?? VAR1...?? =?? ...?? FROM?? WHERE
执行存储过程:
??? informix:?? EXECUTE?? PROCEDURE?? PROCNAME(ARG1...)
??? sql?? server:?? EXECUTE?? PROCNAME?? ARG1...
??? informix:?? EXECUTE?? PROCEDURE?? PROCNAME(ARG1...)?? INTO?? VAR1...
??? sql?? server:?? EXECUTE?? PROCNAME?? ARG1...,?? VAR1...?? OUTPUT
创建存储过程:
??? informix:?? CREATE?? PROCEDURE?? PROCNAME(ARG1...)?? RETURNING...;
??????????????????????? END?? PROCEDURE
??? sql?? server:?? CREATE?? PROCNAME?? @ARG1...?? AS...
??? sql?? server:?? CREATE?? PROCNAME?? @ARG1...?? AS...(临时)
事务控制:
??? informix:?? BEGIN?? WORK
??? sql?? server:?? BEGIN?? TRANSACTION
数据类型:
??? informix:?? date?? datetime
??? sql?? server:?? datetime
数据库表表示:
??? informix:?? database:owner.tablename或database:tablename
??? sql?? server:?? database.owner.tablename或database..tablename
代换规则(UltraEdit)
Replace?? in?? Files中选中Regular?? Expression,?? 按次序执行:
1.?? 替换not?? null的次序:?? ^(default?? *^)?? ^(not?? null^)?? 替换为^2?? ^1
2.?? 替换;为--;
3.?? 替换datetime...:?? ^(datetime?? *?? to?? [a-z]+^)?? 替换为datetime
4.?? 替换current...:?? ^(current?? *?? to?? [a-z]+^)?? 替换为current_timestamp
5.?? 替换today:?? (选中匹配整个单词)替换today为current_timestamp
6.?? 替换date:?? (选中匹配整个单词)替换date为datetime;
????????????????????????? (选中匹配整个单词)替换%datetime为date;???? --字段名字:(
7.?? 替换serial:?? (选中匹配整个单词)替换serial为int?? IDENTITY(1,1)
8.?? 替换BEGIN?? WORK:?? 改为BEGIN?? TRANSACTION
9.?? 替换extent...:?? 替换extent?? size?? *?? next?? size?? *?? lock?? mode?? [a-z]+为空格
????? ???
10.(选中匹配整个单词)替换 "public "为public
11.替换database?? ...?? 为?? use?? ...
12.(选中匹配整个单词)替换nchar?? 为?? char
13.(选中匹配整个单词)替换 "stkhdvg "/ "stkspvg "为public?? --!!
14.替换where?? rowid> 0为空格
15.use?? database?? /?? create?? database之后调用SET?? ANSI_NULL_DFLT_ON?? ON
16.删掉所有constraint?? ...
存储过程
1.?? 所有变量前加@
2.?? define?? ->?? declare
3.?? select?? ...?? into?? ...?? ->?? select?? ...(2)?? =?? ...(1)
4.?? if?? ...?? then?? ->?? if?? ...?? begin
5.?? let?? ->?? set
6.?? 取消;
7.?? end?? if?? ->?? end
8.?? return?? ...?? ->?? return

  评论这张
 
阅读(570)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017