Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

sqlserver ÉÏ»úÁ·Ï°Ìâ

 create database db
use db
go
create table course
(
 sno varchar(20),
 cno int ,
 Gmark int
)
insert into course values('20071513115',1,80)
insert into course values('20071513114',2,80)
insert into course values('20071513113',3,80)
insert into course values('20071513112',4,80)
insert into course values('20071513111',1,80)
insert into course values('20071513110',2,80)
insert into course values('20071513116',3,80)
insert into course values('20071513117',1,80)
select  distinct cno from course
go
create table student
(sno char(7) not null primary key,
 sname varchar(20) not null,
 ssex char(2) not null,
 sage smalldatetime ,
 spno char(5),
 classid char(5),
 Inyear char(4) not null )
insert into student
values('2000101','ÀîÓÂ','ÄÐ','1980-7-1','00311','10497','1999')
insert into student
values('2000102','ÁõÊ«³¿','Å®','1981-8-12','00311','10498','1999')
insert into student
values('2000103','ÍõÒ»Ãù','ÄÐ','1982-12-20','00312','10497','2001')
insert into student
values('2000104','ÕÅæÃæÃ','Å®','1985-5-9','00312','10498','2000')
insert into student
values('2001101','ÀîÃô','Å®','1989-3-9','01311','10497','1999')
insert into student
values('2001102','¼ÖÏòÄÐ','Å®','1982-9-3','01311','10498','2000')
insert into student
values('2001103','³ÂÀ','ÄÐ','1981-5-7','01311','10497','1999')
insert into student
values('2000105','ÕÅÈý','ÄÐ','1984-6-7','01311','10497','1999')
insert into student
values('2000106','ÕÅ','ÄÐ','1984-6-7','01311','10497','1999')
select * from student where spno='01311' and  ssex='Å®'
go
select sname,ssex,sage from student where spno in('01311','01312')
go
select * from student where  sname like 'Àî%'
go


Ïà¹ØÎĵµ£º

ORACLEÁÙʱ±íºÍSQLSERVERÁÙʱ±íÒìͬ

 SQL SERVERÁÙʱ±í
Ò²¿ÉÒÔ´´½¨ÁÙʱ±í¡£ÁÙʱ±íÓëÓÀ¾Ã±íÏàËÆ£¬µ«ÁÙʱ±í´æ´¢ÔÚ tempdb ÖУ¬µ±²»ÔÙʹÓÃʱ»á×Ô¶¯É¾³ý¡£
Óб¾µØºÍÈ«¾ÖÁ½ÖÖÀàÐ͵ÄÁÙʱ±í£¬¶þÕßÔÚÃû³Æ¡¢¿É¼ûÐԺͿÉÓÃÐÔÉϾù²»Ïàͬ¡£±¾µØÁÙʱ±íµÄÃû³ÆÒÔµ¥¸öÊý×Ö·ûºÅ (#) ´òÍ·£»
ËüÃǽö¶Ôµ±Ç°µÄÓû§Á¬½ÓÊǿɼûµÄ£»µ±Óû§´Ó Microsoft? SQL Server? 2000 ʵÀý¶Ï ......

ÈçºÎ½â¾öSQLServerÕ¼ÄÚ´æ¹ý¶àµÄÎÊÌâ

 ¡¡¾­³£¿´¼ûÓÐÈËÎÊ£¬MSSQLÕ¼ÓÃÁËÌ«¶àµÄÄڴ棬¶øÇÒ»¹²»¶ÏµÄÔö³¤£»»òÕß˵ÒѾ­ÉèÖÃÁËʹÓÃÄڴ棬¿ÉÊÇËüûÓÐÓõ½ÄÇô¶à£¬ÕâÊÇÔõôһ»ØʶùÄØ£¿
¡¡¡¡Ê×ÏÈ£¬ÎÒÃÇÀ´¿´¿´MSSQLÊÇÔõÑùʹÓÃÄÚ´æµÄ¡£
¡¡¡¡×î´óµÄ¿ªÏúÒ»°ãÊÇÓÃÓÚÊý¾Ý»º´æ£¬Èç¹ûÄÚ´æ×ã¹»£¬Ëü»á°ÑÓùýµÄÊý¾ÝºÍ¾õµÃÄã»áÓõ½µÄÊý¾ÝͳͳÈÓµ½ÄÚ´æÖУ¬Ö±µ½ÄÚ´æ²»×ãµÄʱºò ......

´¥·¢Æ÷µÄ´´½¨¼°Ê¹ÓÃ(sqlserver 2005)

´¥·¢Æ÷µÄ´´½¨¼°Ê¹ÓÃ(sqlserver 2005)
´´½¨ DML »ò DDL ´¥·¢Æ÷¡£´¥·¢Æ÷ÊÇÊý¾Ý¿â·þÎñÆ÷Öз¢Éúʼþʱ×Ô¶¯Ö´ÐеÄÌØÖÖ´æ´¢¹ý³Ì¡£Èç¹ûÓû§ÒªÍ¨¹ýÊý¾Ý²Ù×÷ÓïÑÔ (DML) ʼþ±à¼­Êý¾Ý£¬ÔòÖ´ÐÐ DML ´¥·¢Æ÷¡£DML ʼþÊÇÕë¶Ô±í»òÊÓͼµÄ INSERT¡¢UPDATE »ò DELETE Óï¾ä¡£DDL ´¥·¢Æ÷ÓÃÓÚÏìÓ¦¸÷ÖÖÊý¾Ý¶¨ÒåÓïÑÔ (DDL) ʼþ¡£ÕâЩÖ÷ÒªÊÇ CRE ......

SqlServer´óÅúÁ¿µ¼Èëµ¼³öÊý¾Ý

BULK INSERT
¡¡¡¡ÔÚSQL ServerÖУ¬BULK INSERTÊÇÓÃÀ´½«ÍⲿÎļþÒÔÒ»ÖÖÌض¨µÄ¸ñʽ¼ÓÔص½Êý¾Ý¿â±íµÄT-SQLÃüÁî¡£¸ÃÃüÁîʹ¿ª·¢ÈËÔ±Äܹ»Ö±½Ó½«Êý¾Ý¼ÓÔص½Êý¾Ý¿â±íÖУ¬¶ø²»ÐèҪʹÓÃÀàËÆÓÚIntegration ServicesÕâÑùµÄÍⲿ³ÌÐò¡£ËäÈ»BULK INSERT²»ÔÊÐí°üº¬Èκθ´ÔÓµÄÂß¼­»òת»»£¬µ«Äܹ»ÌṩÓë¸ñʽ»¯Ïà¹Øµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ