-----²âÊÔ±í(oracle 10G):
create table portal_his.testuser(
XH numeric NOT NULL ,-----¸Ã×Ö¶ÎÖµÊÇΨһµÄ;
deptid numeric NOT NULL ,
zwid numeric NULL ,
names varchar(20) NULL,
constraint testuser_pk PRIMARY KEY (XH)
);
------²âÊÔÊý¾Ý:
insert into portal_his.testuser(XH,deptid,zwid,names)
values(1,1,2,'a1');
insert into portal_his.testuser(XH,deptid,zwid,names)
values(2,1,2,'a1');
insert into portal_his.testuser(XH,deptid,zwid,names)
values(3,1,3,'a3');
insert into portal_his.testuser(XH,deptid,zwid,names)
values(4,1,2,'');
insert into portal_his.testuser(XH,deptid,zwid,names)
values(5,2,4,'a4');
insert into portal_his.testuser(XH,deptid,zwid,names)
values(6,2,6,'a4');
insert into portal_his.testuser(XH,deptid,zwid,names)
values(7,2,10,'a5');
insert into portal_his.testuser(XH,deptid,zwid,names)
values(8,3,10,'');
insert into portal_his.testuser(XH,deptid,zwid,names)
values(9,2,10,'');
insert into portal_his.testuser(XH,deptid,zwid,names)
values(10,3,10,'a7');
Çósql²éѯ¹¦ÄÜ:
-----Èç¹ûnames×Ö¶ÎֵΪ''»ònull,Ôò°Ñ¸Ã¼Ç¼ÖÐdeptidºÍzwidÖµÏàµÈµÄnames×Ö¶ÎÖµÄÚÈÝÈ¡Ò»¸ö³öÀ´(Èç¹ûÕÒµ½¾ÍÈ¡Ò»¸ö³öÀ´,ûÓÐÕÒµ½¾Í²»¹ÜËü).
xh deptid zwid names
1 1 2 a1
2 1 2 a1
3 1 3 a3
4 1 2 -----ÕâÀïµÄ²éѯ
oracle ͨ¹ýBDlink Á¬½Óµ½Ò»Ì¨MS SQL,²éѯ¶¼¿ÉÒÔ,µ«ÊDz»ÖªµÀÈçºÎÔÚoracleͨ¹ýDBLinkµ÷ÓÃMS SQLµÄ´æ´¢¹ý³Ì,Çó½â~лл~
ÒýÓÃ
oracle ͨ¹ýBDlink Á¬½Óµ½Ò»Ì¨MS SQL,²éѯ¶¼¿ÉÒÔ,µ«ÊDz»ÖªµÀÈçºÎÔÚoracleͨ¹ýDBLinkµ÷ÓÃM ......