¡¶£Ó£Ñ£Ì Óï·¨²Î¿¼ÊÖ²á(SQL)¡·
£Ó£Ñ£Ì Óï·¨²Î¿¼ÊÖ²á(SQL)/Êý¾ÝÀàÐÍ
DB2 ÌṩÁ˹ØÁ¬Ê½×ÊÁÏ¿âµÄ²éѯÓïÑÔ £Ó£Ñ£Ì (Structured Query Language)£¬ÊÇÒ»Öַdz£¿ÚÓﻯ¡¢¼ÈÒ×ѧÓÖÒ׶®µÄÓï·¨¡£´ËÒ»ÓïÑÔ¼¸ºõÊÇÿ¸ö×ÊÁÏ¿âϵͳ¶¼±ØÐëÌṩµÄ£¬ÓÃÒÔ±íʾ¹ØÁ¬Ê½µÄ*×÷£¬°üº¬ÁË×ÊÁϵĶ¨Ò壨£Ä£Ä£Ì£©ÒÔ¼°×ÊÁϵĴ¦Àí£¨£Ä£Í£Ì£©¡£SQLÔÀ´Æ´³ÉSEQUEL£¬ÕâÓïÑÔµÄÔÐÍÒԓϵͳ R“µÄÃû×ÖÔÚ IBM Ê¥ºÉÎ÷ʵÑéÊÒÍê³É£¬¾¹ýIBMÄÚ²¿¼°ÆäËûµÄÐí¶àʹÓÃÐÔ¼°Ð§ÂʲâÊÔ£¬Æä½á¹ûÏ൱ÁîÈËÂúÒ⣬²¢¾ö¶¨ÔÚϵͳR µÄ¼¼Êõ»ù´¡·¢Õ¹³öÀ´ IBM µÄ²úÆ·¡£¶øÇÒÃÀ¹ú¹ú¼Ò±ê׼ѧ»á£¨ANSI£©¼°¹ú¼Ê±ê×¼»¯×éÖ¯£¨ISO£©ÔÚ1987×ñÑÒ»¸ö¼¸ºõÊÇÒÔ IBM SQL Ϊ»ù´¡µÄ±ê×¼¹ØÁ¬Ê½×ÊÁÏÓïÑÔ¶¨Òå¡£
Ò»¡¢×ÊÁ϶¨Òå £Ä£Ä£Ì£¨Data Definition Language)
×ÊÁ϶¨ÓïÑÔÊÇÖ¸¶Ô×ÊÁϵĸñʽºÍÐÎ̬϶¨ÒåµÄÓïÑÔ£¬ËûÊÇÿ¸ö×ÊÁÏ¿âÒª½¨Á¢Ê±ºòʱÊ×ÏÈÒªÃæ¶ÔµÄ£¬¾Ù·²×ÊÁÏ·ÖÄÄЩ±í¸ñ¹Øϵ¡¢±í¸ñÄÚµÄÓÐʲ÷áÀ¸Î»Ö÷¼ü¡¢±í¸ñºÍ±í¸ñÖ®¼ä»¥Ïà²Î¿¼µÄ¹ØϵµÈµÈ£¬¶¼ÊÇÔÚ¿ªÊ¼µÄʱºòËù±ØÐë¹æ»®ºÃµÄ¡£
£±¡¢½¨±í¸ñ£º
Create TABLE table_name(
column1 DATATYPE [NOT NULL] [NOT NULL PRIMARY KEY],
column2 DATATYPE [NOT NULL],
...£©
˵Ã÷£º¡¡
DATATYPE --ÊÇ×ÊÁϵĸñʽ£¬Ïê¼û±í¡£
NUT NULL --¿É²»¿ÉÒÔÔÊÐí×ÊÁÏÓпյģ¨ÉÐδÓÐ×ÊÁÏÌîÈ룩¡£
PRIMARY KEY --ÊDZ¾±íµÄÖ÷¼ü¡£
£²¡¢¸ü¸Ä±í¸ñ¡¡
Alter TABLE table_name
ADD COLUMN column_name DATATYPE
˵Ã÷£ºÔö¼ÓÒ»¸öÀ¸Î»£¨Ã»ÓÐɾ³ýij¸öÀ¸Î»µÄÓï·¨¡£
Alter TABLE table_name
ADD PRIMARY KEY (column_name)
˵Ã÷£º¸ü¸Ä±íµÃµÄ¶¨Òå°Ñij¸öÀ¸Î»ÉèΪÖ÷¼ü¡£
Alter TABLE table_name
Drop PRIMARY KEY (column_name)
˵Ã÷£º°ÑÖ÷¼üµÄ¶¨Òåɾ³ý¡£
£³¡¢½¨Á¢Ë÷Òý¡¡
Create INDEX index_name ON table_name (column_name)
˵Ã÷£º¶Ôij¸ö±í¸ñµÄÀ¸Î»½¨Á¢Ë÷ÒýÒÔÔö¼Ó²éѯʱµÄËٶȡ£
£´¡¢É¾³ý¡¡
Drop table_name
Drop 
Ïà¹ØÎĵµ£º
SQL SERVER 2008Öж¨Ê±±¸·ÝÊý¾Ý¿âÈÎÎñµÄ´´½¨Óëɾ³ý
[http://news.newhua.com/news1/program_database/2008/1215/0812151515485B22JHGBK9HJ87DK09D6958HB8K83EJ0053JKGC1A543.html]
ÓÉÓÚ֮ǰÊÇʹÓÃSQL SERVER 2000»òÕß2005£¬Õâ´Î¸ø¿Í»§°²×°Ê±Ê¹ÓÃ2008 SERVER£¬±¾ÒÔΪ´´½¨Êý¾Ý¿â¶¨Ê±±¸·ÝÈÎÎñ»áÓë2000/2005ÓкܴóÇø±ð£¬µ«¾ ......
1.²éѯµÄÄ£ºýÆ¥Åä
¾¡Á¿±ÜÃâÔÚÒ»¸ö¸´ÔÓ²éѯÀïÃæʹÓà LIKE '%parm1%'—— ºìÉ«±êʶλÖõİٷֺŻᵼÖÂÏà¹ØÁеÄË÷ÒýÎÞ·¨Ê¹Óã¬×îºÃ²»ÒªÓÃ.
½â¾ö°ì·¨:
ÆäʵֻÐèÒª¶Ô¸Ã½Å±¾ÂÔ×ö¸Ä½ø£¬²éѯËٶȱã»áÌá¸ß½ü°Ù±¶¡£¸Ä½ø·½·¨ÈçÏ£º
a¡¢ÐÞ¸Äǰ̨³ÌÐò——°Ñ²éѯÌõ¼þµÄ¹©Ó¦ÉÌÃû³ÆÒ»À¸ÓÉÔÀ´µÄÎı¾ÊäÈë¸ÄΪÏÂÀÁб ......
²é¿´SQL°æ±¾ÒÔ¼°²¹¶¡µÄ·½·¨ ¡¾http://hi.baidu.com/yangyanchen2008/blog/item/afe337173318130fc93d6df6.html¡¿
²é¿´SQL°æ±¾µÄ·½·¨£º´ò¿ª²éѯ·ÖÎöÆ÷£¬Ê¹ÓÓSELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition') ”²éѯ¼´¿É¡£SQL°æ±¾¶ÔÕÕ±í£º
......
³£ÓÃSQLÓï¾äÊéд¼¼ÇÉ
×÷Õߣº À´Ô´£ºjavaeye²©¿Í ·¢²¼Õߣºadmin
ʱ¼ä£º2009-05-11 10:07:41 µã»÷£º2010
SQL½á¹¹»¯²éѯ×Ö·û´®µÄ¸Äд£¬ÊÇʵÏÖÊý¾Ý¿â²éѯÐÔÄÜÌáÉýµÄ×îÏÖʵ¡¢×îÓÐЧµÄÊֶΣ¬ÓÐʱÉõÖÁÊÇΨһµÄÊֶΣ¬±ÈÈçÔÚ²»ÔÊÐí´ó·ù¶ÈÐÞ¸ÄÏÖÓÐÊý¾Ý¿â½á¹¹µÄÇé¿öÏ¡£
ͨ¹ ......
windowsÉÏ´æÔÚ32bitµÄÏÞÖÆ£¬ÈçAIX¡¢HP UNIX µÈÓÐÃ÷È·µÄ64BIT OS and ORACLEµÄ°æ±¾£¬32bit oracle¿ÉÒÔ×°ÔÚ64bit os ÉÏ£¬64 bit oracle²»ÄÜ×°ÔÚ32 bit OSÉÏ
oracleÊÇ64bit or 32 bit,32bit ͨ³£ SGAÓÐ 1.7G µÄÏÞÖÆ(ijЩOSµÄ´¦Àí»òÕßWINDOWSÉÏÓÐÌض¨É趨¿ÉÒÔÖ§³Öµ½2GÒÔÉÏÉõÖÁ´ïµ½3.7G
ÈçºÎ²é³öǰ̨ÕýÔÚ·¢³öµÄsqlÓï¾ä:
sele ......