首页  编辑  

浅谈ACCESS数据库升迁SQLSERVER注意事项

Tags: /超级猛料/Database.数据库相关/SQL Server/   Date Created:

         

              SERVER

             

 serverServer;

1

  access

  SQLSERVER2000 '1981-02-12''

2,SQL,update

 

  SQLSERVER

  UPDATE Tab1

  SET a.Name = b.Name

  FROM Tab1 a,Tab2 b

  WHERE a.ID = b.ID;

 

  UPDATE Tab1 a,Tab2 b

  SET a.Name = b.Name

  WHERE a.ID = b.ID;

 

UPDATE table1 set ab='12',cd=444 where ....

3,delete

   access* from table1 where a>2

  sqlserve delete from table1 where a>2

4 as

 accessa,sum(num) as kc_num,kc_num*num as all_kc_num   AS

 sqlserver a,sum(num) as kc_num,sum(num)*num as all_kc_num   AS

5

  accesstab1!a as tab1a,tab2!b tab2b from tab1,tab2  , AS

tab1.a as tab1a,tab2.b tab2b from tab1,tab2  , AS

6,

access select a,b from(

 select a,b from tab1 where a>3 union select c,d from tab2 ) group by a,b

sqlserve select a,b from(

 select a,b from tab1 where a>3 union select c,d from tab2 ) tmptable group by a,b

7

8,true

 accesstrue

 sqlserver1=1

9,

 

 Accessserverwhere code is null where code is nol null

 

    Access is null,0,[num])  iif([num] is null,[num1],[num])

    SQLServer: isnull([num],0) isnull([num],[num1])

10,SQL

access:MID

left(cs1,4)+'-'+cs2 as cs3

SQLServer: SUBSTRING(expression, start, length)

substring(cs1, 1, 2) + substring(cs1, 4, 2) + '-' + cs2 as cs3  

SERVER

  SERVER

Win98SERVER