ʹÓÃvisio 2003½¨Á¢sql server·´Ïò¹¤³Ì
Èý²½×ß¡£
<1>½¨Á¢Êý¾ÝÔ´
´ò¿ª¿ØÖÆÃæ°å—>¹ÜÀí¹¤¾ß—>Êý¾ÝÔ´ (ODBC)£¬»òÖ±½ÓÔËÐÐodbccp32.cplÃüÁî¡£´ò¿ªODBCÊý¾ÝÔ´¹ÜÀíÆ÷¡£Ìí¼ÓÒ»¸öϵͳÊý¾ÝÔ´¡£Ñ¡ÔñSql Server×÷ΪÊý¾ÝÔ´µÄÇý¶¯³ÌÐò£¬¼üÈëÊý¾ÝÔ´Ãû³Ædemo£¬Ñ¡ÔñºÏÊʵÄsql server·þÎñÆ÷£¬È»ºóһ·ĬÈÏÏÂÈ¥¡££¨ÔÚºóÃæµÄ²½ÖèÖпÉÒÔÑ¡ÔñÐèÒª½øÐз´Ïò¹¤³ÌµÄÊý¾Ý¿â£¬Ä¬ÈÏÊÇmaster£©Êý¾ÝÔ´ÐÅÏ¢Èçͼһʾ¡£
ͼһ
<2>ÔÚvisioÖÐн¨Êý¾Ý¿âÄ£ÐÍͼ
´ò¿ªvisio 2003,Îļþ—>н¨—>Êý¾Ý¿â—>Êý¾Ý¿âÄ£ÐÍͼ¡£½¨Á¢Êý¾Ý¿âÄ£ÐÍͼ֮ºó£¬²Ëµ¥À¸¶à³öÒ»¸ö²Ëµ¥Ïî"Êý¾Ý¿â"¡£
<3>·´Ïò¹¤³Ì
²Ëµ¥ÏîÊý¾Ý¿â—>·´Ïò¹¤³Ì¡£Æô¶¯·´Ïò¹¤³ÌÏòµ¼£¬Ò»²½²½Íê³É·´Ïò¹¤³ÌÉèÖá£
1.½¨Á¢ÓëÊý¾Ý¿âµÄÁ¬½Ó¡£Ñ¡ÔñvisioÇý¶¯³ÌÐòµÄÀàÐ;ö¶¨ÁË¿ÉÒÔÁ¬½ÓµÄÊý¾Ý¿âÀàÐͼ°¿ÉÓÃÑ¡Ïî¡£Êý¾ÝÔ´Ö¸¶¨Êý¾Ý¿âλÖü°Á¬½ÓÐÅÏ¢¡£ÕâÀïÎÒÃÇÑ¡ÔñvisioÇý¶¯³ÌÐòΪMicrosoft Sql Server,Êý¾ÝԴΪ¸Õ½¨Á¢µÄdemo¡£Èçͼ¶þʾ¡£
ͼ¶þ
2.Á¬½ÓÊý¾ÝÔ´¡£ÊäÈëÓû§ÃûºÍÃÜÂëÓÃÓÚÁ¬½ÓÊý¾ÝÔ´¡£
3.Ñ¡ÔñÒª½øÐз´Ïò¹¤³ÌµÄ¶ÔÏóÀàÐÍ£¬ÈçͼÈýʾ¡£
ͼÈý
4.Ñ¡ÔñÒª½øÐз´Ïò¹¤³ÌµÄ±íºÍÊÓͼ¡£
5.Ñ¡ÔñÒª½øÐÐôÏò¹¤³ÌµÄ´æ´¢¹ý³Ì¡£
6.ÊÇ·ñÏëÈÃÑ¡ÔñÁË·´Ïò¹¤³ÌµÄÏîÌí¼Óµ½µ±Ç°¹¤³ÌÖС£Ñ¡ÔñÊDzÅÄÜÉú³Éͼ¡£
½á¹û´óÖÂÏòÏÂÃæÕâÑù¡£
Ïà¹ØÎĵµ£º
´¥·¢Æ÷
¶¨Ò壺 ºÎΪ´¥·¢Æ÷£¿ÔÚSQL ServerÀïÃæÒ²¾ÍÊǶÔijһ¸ö±íµÄÒ»¶¨µÄ²Ù×÷£¬´¥·¢Ä³ÖÖÌõ¼þ£¬´Ó¶øÖ´ÐеÄÒ»¶Î³ÌÐò¡£´¥·¢Æ÷ÊÇÒ»¸öÌØÊâµÄ´æ´¢¹ý³Ì¡£
³£¼ûµÄ´¥·¢Æ÷ÓÐÈýÖÖ£º·Ö±ðÓ¦ÓÃÓÚInsert , Update , Delete ʼþ¡£(SQL& ......
Student(S#,Sname,Sage,Ssex) ѧÉú±í
Course(C#,Cname,T#) ¿Î³Ì±í
SC(S#,C#,score) ³É¼¨±í
Teacher(T#,Tname) ½Ìʦ±í
ÎÊÌ⣺
1¡¢²éѯ“001”¿Î³Ì±È“002”¿Î³Ì³É¼¨¸ßµÄËùÓÐѧÉúµÄѧºÅ£»
select a.S# from (select s#,score from SC where C#='001') a,(select s#,score
fr ......
ÔÎĵØÖ·£ºhttp://www.programfan.com/article/2597.html
1.×Ö·û´®º¯Êý
³¤¶ÈÓë·ÖÎöÓÃ
datalength(Char_expr) ·µ»Ø×Ö·û´®°üº¬×Ö·ûÊý,µ«²»°üº¬ºóÃæµÄ¿Õ¸ñ
substring(expression,start,length) ²»¶à˵ÁË,È¡×Ó´®
right(char_expr,int_expr) ·µ»Ø×Ö·û´®ÓÒ±ßint_expr¸ö×Ö·û
×Ö·û²Ù×÷Àà
upper(char_expr) תΪ´óд
lower(c ......
select name as ¿âÃû from master..sysdatabases where dbid>=7 »ñµÃÊý¾Ý¿âÃû³Æ
select * from sysobjects where xtype='u' or xtype='v' ²éѯÊý¾Ý¿âÀïËùÓбíµÄsqlÓï¾ä£¡
select name from sysobjects where type='u' ²éѯһ¸ö¿ ......
¶ÔInºÍexistsµÄÐÔÄܽøÐбȽϣ¬Ê×ÏÈÒªÖªµÀËüÃÇÁ½ÕßµÄÇø±ð¡£
in: È·¶¨¸ø¶¨µÄÖµÊÇ·ñÓë×Ó²éѯÖеÄÖµ»òÁбíÖеÄÖµÏàÆ¥Åä¡£
exists: Ö¸¶¨Ò»¸ö×Ó²éѯ£¬¼ì²âÐÐÊÇ·ñ´æÔÚ¡£
¿É·ÖÎöËüÃǵIJéѯÓï¾äÀ´µÃ³öÕæʵµÄ²î±ð:
in
±ÈÈçSelect * from t1 where x in ( select y from t2 )
Ö´ÐеĹý³ÌÏ൱ÓÚ:
select *
from t1, ( ......