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

sql ¶à±í¹ØÁª²éѯ

 create database example
use example
create table major
(
 spno varchar(10) primary key not null,
 spname varchar(20) not null
 )
 create table student
(
 sno varchar(10) primary key not null,
 sname varchar(10) not null,
 ssex varchar(2) not null,
 spno varchar(10) foreign key references major(spno)
)
create table course
( cno varchar(10) primary key not null,
  cname varchar(10) not null
 )
create table  scourse
(
 sno varchar(10) foreign key references student(sno),
 cno varchar(10) foreign key references course(cno),
 gmark int
)
insert into major values('001','Ó¢Óï')
insert into major values('002','ÓïÎÄ')
insert into major values('003','Êýѧ')
insert into major values('004','ÉúÎï')
insert into major values('005','ÎïÀí')
insert into major values('006','»¯Ñ§')
insert into student values('2007151301','bobo','ÄÐ','001')
insert into student values('2007151302','roy','ÄÐ','002')
insert into student values('2007151303','max','ÄÐ','004')
insert into student values('2007151304','tony','ÄÐ','004')
insert into student values('2007151305','jaims','ÄÐ','005')
insert into student values('2007151306','wing','ÄÐ','006')
insert into student values('2007151307','allen','ÄÐ','001')
insert into student values('2007151308','heng','ÄÐ','002')
insert into student values('2007151309','chart','ÄÐ','003')
insert into course values('001','ƹÅÒÇò')
insert into course values('002','ÀºÇò')
insert into course values('003','×ãÇò')
insert into course values('004','ÍøÇòÇò')
insert into course values('005','Î赸')
insert into course values('006','è¤Ù¤')
insert into course values('007','ÓÎÓ¾')
insert into scourse values('2007151301','001','88')
insert into scourse values('2007151302','002','88')
insert into scourse values('2007151303','003','88')
insert into scourse values('2007151304','004','88')
insert into scourse values('2007151305','005','88')
insert into scourse val


Ïà¹ØÎĵµ£º

SQLÊÂÎñ´¦ÀíÓï¾ä×ܽá

 
´æ´¢¹ý³ÌÖг£Óõ½µÄSQLÊÂÎñ´¦ÀíÓï¾ä¸ñʽ¿ÉÄÜ»áÓÐÈçϼ¸ÖÖ:
µÚÒ»ÖÖ:
set   xact_abort   on 
begin   tran 
        insert   ... 
        update   ... 
    ......

SqlDbType ö¾ÙÓë Microsoft SQL Server Êý¾ÝÀàÐÍ

 
 ³ÉÔ±Ãû³Æ˵Ã÷
BigInt
Int64¡£64 λµÄÓзûºÅÕûÊý¡£ 
Binary
Byte ÀàÐ굀 Array¡£¶þ½øÖÆÊý¾ÝµÄ¹Ì¶¨³¤¶ÈÁ÷£¬·¶Î§ÔÚ 1 µ½ 8,000 ¸ö×Ö½ÚÖ®¼ä¡£ 
Bit
Boolean¡£ÎÞ·ûºÅÊýÖµ£¬¿ÉÒÔÊÇ 0¡¢1 »ò ¿ÕÒýÓã¨ÔÚ Visual Basic ÖÐΪ Nothing£©¡£ 
Char
String¡£·Ç Unicode ×Ö·ûµÄ¹Ì¶¨³¤¶ÈÁ÷£¬·¶Î§ÔÚ 1 ......

Éú³ÉÊ¡ÊеÄSQL½Å±¾

 --Ê¡¼¶   Provincial
--³ÇÊР  City
create table Provincial(pid int,Provincial varchar(50),primary key (pid))
insert into Provincial values(1,'±±¾©ÊÐ')
insert into Provincial values(2,'Ìì½òÊÐ')
insert into Provincial values(3,'ÉϺ£ÊÐ')
insert into Provincial values(4,'Ö ......

SQL 2008ÖеÄÍÚ¾òÄ£ÐÍ

SQL Server 2008 Áª»ú´ÔÊ飨2009 Äê 7 Ô£©
ÍÚ¾òÄ£ÐÍ£¨Analysis Services - Êý¾ÝÍÚ¾ò£©
±¾½Ú½éÉÜÁËÊý¾ÝÍÚ¾òÄ£Ð͵Ļù±¾Ìåϵ½á¹¹£¬¸ÅÊöÁËÊý¾ÝÍÚ¾òÄ£Ð͵ÄÊôÐÔ£¬²¢ËµÃ÷ÁË´´½¨ºÍ´¦ÀíÍÚ¾òÄ£Ð͵ķ½Ê½¡£
Mining Model Architecture
Defining Mining Models
Mining Model Properties
Mining Model Columns
Processing Min ......

sql ²Ù×÷

 exec   sp_rename   't_2.lname','lastname','column' 
exec   sp_rename   ‘tabelname’,'new'
 
»ñµÃsqlÓï¾äµÄÖ´ÐÐʱ¼ä£º
SET STATISTICS TIME ON
// sql Óï¾ä£ºselect * from table
SET STATISTICS TIME OFF
 
 
´´½¨Ë÷Òý£ºCRE ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ