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

SQLÏ°Ìâ1

µÚÒ»Ì⣺
Ϊ¹ÜÀíÒµÎñÅàѵÐÅÏ¢£¬½¨Á¢3¸ö±í£º
S(S#,SN,SD,SA)S#,SN,SD,SA·Ö±ð´ú±íѧºÅ£¬Ñ§Ô±ÐÕÃû£¬ËùÊôµ¥Î»£¬Ñ§Ô±ÄêÁä
C(C#,CN)C#,CN·Ö±ð´ú±í¿Î³Ì±àºÅ£¬¿Î³ÌÃû³Æ
SC(S#,C#,G) S#,C#,G·Ö±ð´ú±íѧºÅ£¬ËùÑ¡µÄ¿Î³Ì±àºÅ£¬Ñ§Ï°³É¼¨
(1)ʹÓñê×¼SQLǶÌ×Óï¾ä²éѯѡÐ޿γÌÃû³ÆΪ’Ë°ÊÕ»ù´¡’µÄѧԱѧºÅºÍÐÕÃû?
(2) ʹÓñê×¼SQLǶÌ×Óï¾ä²éѯѡÐ޿γ̱àºÅΪ’C2’µÄѧԱÐÕÃûºÍËùÊôµ¥Î»?
(3) ʹÓñê×¼SQLǶÌ×Óï¾ä²éѯ²»Ñ¡Ð޿γ̱àºÅΪ’C5’µÄѧԱÐÕÃûºÍËùÊôµ¥Î»?
(4) ²éѯѡÐÞÁ˿γ̵ÄѧԱÈËÊý?
(5) ²éѯѡÐ޿γ̳¬¹ý5ÃŵÄѧԱѧºÅºÍËùÊôµ¥Î»?
drop table S;
drop table C;
drop table SC;
create table S
(
S# varchar(10),
SN varchar (25),
SD varchar (25),
SA int
)
create table C
(
C# varchar(10),
CN varchar (25)
)
create table SC
(
S# varchar(10),
C# varchar(10),
G int
Primary Key(S#, C#)
)
insert into S values ('10001','Students1','department1',23)
insert into S values ('10002','Students2','department1',24)
insert into S values ('10003','Students3','department2',25)
insert into S values ('10004','Students4','department2',26)
insert into S values ('10005','Students5','department3',23)
insert into S values ('10006','Students6','department3',24)
insert into S values ('10007','Students7','department3',25)
insert into S values ('10008','Students8','department4',25)
insert into C values ('C1','Êýѧ')
insert into C values ('C2','ÎïÀí')
insert into C values ('C3','»¯Ñ§')
insert into C values ('C4','Ó¢Óï')
insert into C values ('C5','ÖÐÎÄ')
insert into C values ('C6','Ë°ÊÕ»ù´¡')
insert into C values ('C7','´«Ã½')
insert into C values ('C8','ÈÕÓï')
insert into SC values ('10001','C1',67)
insert into SC values ('10001','C2',77)
insert into SC values ('10001','C3',87)
insert into SC values ('10001','C4',97)
insert into SC values ('10001','C5',57)
insert into SC values ('10001','C6',47)
insert into SC values ('10002','C1',62)
insert into SC values ('10002','C2',72)
insert into SC values ('10002','C3',82)
insert into SC values ('10002','C4',92)
insert


Ïà¹ØÎĵµ£º

SQL×¢È멶´È«½Ó´¥

  Ëæ×ÅB/SģʽӦÓÿª·¢µÄ·¢Õ¹£¬Ê¹ÓÃÕâÖÖģʽ±àдӦÓóÌÐòµÄ³ÌÐòÔ±Ò²Ô½À´Ô½¶à¡£µ«ÊÇÓÉÓÚÕâ¸öÐÐÒµµÄÈëÃÅÃż÷²»¸ß£¬³ÌÐòÔ±µÄˮƽ¼°¾­ÑéÒ²²Î²î²»Æ룬Ï൱´óÒ»²¿·Ö³ÌÐòÔ±ÔÚ±àд´úÂëµÄʱºò£¬Ã»ÓжÔÓû§ÊäÈëÊý¾ÝµÄºÏ·¨ÐÔ½øÐÐÅжϣ¬Ê¹Ó¦ÓóÌÐò´æÔÚ°²È«Òþ»¼¡£Óû§¿ÉÒÔÌá½»Ò»¶ÎÊý¾Ý¿â²éѯ´úÂ룬¸ù¾Ý³ÌÐò·µ»ØµÄ½á¹û£¬»ñµÃijР......

SQL×¢È멶´È«½Ó´¥

 
µÚÒ»½Ú¡¢SQL×¢ÈëµÄÒ»°ã²½Öè
Ê×ÏÈ£¬Åжϻ·¾³£¬Ñ°ÕÒ×¢Èëµã£¬ÅжÏÊý¾Ý¿âÀàÐÍ£¬ÕâÔÚÈëÃÅƪÒѾ­½²¹ýÁË¡£
Æä´Î£¬¸ù¾Ý×¢Èë²ÎÊýÀàÐÍ£¬ÔÚÄÔº£ÖÐÖع¹SQLÓï¾äµÄԭò£¬°´²ÎÊýÀàÐÍÖ÷Òª·ÖΪÏÂÃæÈýÖÖ£º
(A) ID=49 ÕâÀà×¢ÈëµÄ²ÎÊýÊÇÊý×ÖÐÍ£¬SQLÓï¾äԭò´óÖÂÈçÏ£º
Select * from ±íÃû where ×Ö¶Î=49
×¢ÈëµÄ²ÎÊýΪID=49 And [²é ......

SQLÖÐÈçºÎÕýÈ·ÈÏʶ´¥·¢Æ÷

¶ÔÓÚ³õѧÕ߶Դ¥·¢Æ÷µÄÀí½âÍùÍù²»ÊǺÜ͸³¹£¬¼ÇµÃ×Ô¼ºµ±³õѧµÄʱºò×ÜÓеãÃþ²»ÇåÍ·ÄԵĸоõ£¬½ñÌì¾ÍÏëÆðºÍ´ó¼Ò×ܽáһϣ¬Èç¹ûÎÄÕ³öÏÖЩ覴ÃÇë¸ßÊÖ¶à¶àÖ¸½ÌŶ£¡
´¥·¢Æ÷ÊÇÊý¾Ý¿â·þÎñÆ÷Öз¢Éúʼþʱ×Ô¶¯Ö´ÐеÄÌØÊâ´æ´¢¹ý³Ì£¬Ëü²åÈ롢ɾ³ý»òÐÞ¸ÄÌرíÖеÄÊý¾Ýʱ´¥·¢Ö´ÐС£´¥·¢Æ÷ͨ³£¿ÉÒÔÇ¿ÖÆÖ´ÐÐÒ»¶¨µÄÒµÎñ¹æÔò£¬ÒÔ±£³ÖÊý¾ÝÍêÕûÐÔ ......

ms sql dateimeÖ®1905

 ÔÚ×ö“¶¼ÊмÒÔ°”ÓÅ»¯Ê±£¬¾ßÌåÊÇÓû§×¢²áʱ£¬Ìá½»ÐÅÏ¢£¬±¾À´BirthdayÊÇûÓÐдÈëÖµµÄ£¬´Ë×Ö¶ÎҲûÓÐĬÈÏÖµ£¬¿ÉÊý¾Ý¿âÖÐȴΪ“1905/3/14 0:00:00”£¬ÓôÃÆÖÁ¼«£¬ÉÏgoogle&baiduÒ²ÊÇûÓнâ¾öµÄ·½°¸¡£
Ö»ÄÜÕâÑùԭʼµÄ½â¾ö£º
Register ´æ´¢¹ý³Ì
   insert into UserInfo(UserID,sex) ......

±È½ÏSQL ServerÓëOracle DB2

 ¿ª·¢Êý¾Ý¿âÓ¦Óã¬Ñ¡ÔñÒ»¸öºÃµÄÊý¾Ý¿âÊǷdz£ÖØÒªµÄ¡£±¾ÎÄ´ÓһЩ·½Ãæ±È½ÏÁËSQL ServerÓëOracle¡¢DB2ÈýÖÖÊý¾Ý¿â£¬ÎªÄãÑ¡ÔñÊý¾Ý¿âÌṩһЩ²Î¿¼¡£
¡¡¡¡
¡¡¡¡¿ª·ÅÐÔ
¡¡¡¡SQL Server
¡¡¡¡Ö»ÄÜÔÚWindows ÉÏÔËÐУ¬Ã»ÓÐË¿ºÁµÄ¿ª·ÅÐÔ£¬²Ù×÷ϵͳµÄϵͳµÄÎȶ¨¶ÔÊý¾Ý¿âÊÇÊ®·ÖÖØÒªµÄ¡£Windows9XϵÁвúÆ·ÊÇÆ«ÖØÓÚ×ÀÃæÓ¦Óã¬NT se ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ