Access 2003 与 MS SQL 2000 [sql]

MS SQL 2000 与 Access 2003 sql[ANSI89/92]语言使用的区别:
在使用这两种数据库时候,发觉它们差别还是比较大的,总结了几点出来

数据库技术我采用ADO.NET来访问MS SQL 2000  [开发平台用vs 2003],
采用ADO 2.6来访问Access 2003 [开发平台用vb 6.0]测试


1.支持的数据类型不同
MS SQL 2000                      Access 2003
varchar(0-8000)                  text(0-255)
int/bigint                                integer/数字
long                                        数字
标识位                                   自动编号
bit(0/1)                                  是/否(true/false)
text                                         备注[好像只有4k容量]
DateTime                             日期[Date],时间[Time],日期时间
image                                    ole对象
2.关键字
id,name,user在MS Server 2000的sql中都是关键字,使用时需[id],[name]
而在access中不是
3.语句
A.
select 'username'=a from table1
ms server 2000支持          Access不支持
select a as username from table1
ms server 2000支持          Access 2003支持 
B.
insert table1 values('a',1)
ms server 2000支持          Access不支持
insert into table1(c1,c2) values('a',1)
ms server 2000支持          Access 2003支持 
C.
delete table1 where [id]=1
ms server 2000支持          Access不支持
delete from table1 where [id]=1
ms server 2000支持          Access 2003支持 
D.
bool类型的列更改数据
ms server 2000
update t1 set c2=1 where [id]=1
Access 2003
update t1 set c2=true where id=1
4.内置函数
MS Sql Server 2000       Access 2003
substring                            mid
len                                        len
trim                                       trim
left                                        left
right                                     right
getDate                              now
...                                          ...

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值