SQL SERVER 2005 Ô¶³Ì·ÃÎÊ
(ÊÊÓà SQL Server 2005 ÆäËû°æ±¾)
ÊÕ²Ø
SQL Server 2005 Express ÊÇ΢ÈíÌṩµÄÊý¾Ý¿âµÄµÍ¶Ë½â¾ö·½°¸,
¿ÉÃâ·ÑÈÎÒâËæ²úÆ··Ö·¢, ¿ÉÒÔÔÚXPµÈ·Çרҵ·þÎñÆ÷ϵͳÏ°²×°, »¹¿ÉÒÔÔ¶³Ì·ÃÎÊ, ¶ÔÓÚСÐÍÊý¾ÝÓ¦ÓóÌÐòÒÑ×ã¹»Âú×ãÊý¾ÝʹÓÃÒªÇó.
ĬÈÏ°²×°ÏÂ,SQL Server 2005 Express ²»ÔÊÐíÔ¶³Ì·ÃÎÊ, ¸ù¾Ý×Ô¼ºµÄʵ¼ù, ÏÖ×ܽáÏÂSQL Server 2005
Express Ô¶³Ì·ÃÎÊÉèÖù¥ÂÔ, Ï£Íû¶Ô³õѧÕßÓÐËù°ïÖú.
Ô¶³Ì·ÃÎʹ¥ÂÔÖ®Ò»: ¶¯Ì¬¶Ë¿Ú²ßÂÔ
Ò» Ê×ÏÈͨ¹ýÒÔÏÂÁ½ÖÖ·½Ê½Ö®Ò»´ò¿ª SQL Server ÍâΧӦÓÃÅäÖÃÆ÷
1.¿ªÊ¼--ÔËÐпòÖÐÊäÈë C:\Program Files\Microsoft SQL
Server\90\Shared\SqlSAC.exe
2.¿ªÊ¼--ËùÓгÌÐò--Microsoft SQL Server 2005--ÅäÖù¤¾ß--SQL Server ÍâΧӦÓÃÅäÖÃÆ÷
µãÈ·¶¨Í˳ö
¶þ È»ºóͨ¹ýÒÔÏÂÁ½ÖÖ·½Ê½Ö®Ò»´ò¿ªSQL Server Configuration Manager
1.¿ªÊ¼--ÔËÐпòÖÐÊäÈë C:\WINDOWS\system32\mmc.exe /32
"C:\WINDOWS\system32\SQLServerManager.msc"
2.¿ªÊ¼--ËùÓгÌÐò--Microsoft SQL Server 2005--ÅäÖù¤¾ß--SQL Server Configuration
Manager
Èý È·±£sql server Browser·þÎñÒÑ°²×°²¢´¦ÓÚÆô¶¯×´Ì¬£¬sql server
Browser·þÎñʹµÃ¿Í»§¶ËÔÚ·ÃÎÊʱ²»ÐèÖ¸¶¨¶Ë¿ÚºÅ¡£ÔÚserver ²ÉÓö¯Ì¬ÅäÖö˿ںŵÄÇé¿öÏ£¬±ØÐëÒª¿ªÆôsql server
Browser·þÎñ¡£Ä¬ÈÏÇé¿öÏ£¬Êý¾Ý¿âÒýÇæµÄĬÈÏʵÀýʹÓà 1433 ºÅ TCP ¶Ë¿Ú¡£µ«ÃüÃûʵÀýÔÚÆô¶¯Ê±£¬»á¶¯Ì¬·ÖÅäδʹÓÃµÄ TCP
¶Ë¿ÚºÅ¡£ÔÚĬÈÏ°²×°Ï£¬server »á°²×°²¢ÆôÓÃsql server Browser·þÎñ¡£
ËÄ ÔÚWindows ·À»ðǽÖÐΪ“SQL Server 2005”´´½¨ÀýÍâ
1.ÔÚ Windows ·À»ðǽÉèÖýçÃæÖУ¬Ñ¡Ôñ“ ÀýÍâ”
Ñ¡Ï£¬È»ºóµ¥»÷“Ìí¼Ó³ÌÐò”
2.ÔÚ“Ìí¼Ó³ÌÐò´°¿Ú”Öе¥»÷“ä¯ÀÀ”
3.È»ºóÕÒµ½“C:\ProgramFiles
\Microsoft Files\Microsoft SQL Server\ MSSQL.1
\MSSQL\Binn\sqlservr.exe”, µ¥»÷"È·¶¨". ×¢Ò⣺ ·¾¶¿ÉÄÜ»á¸ù¾Ý SQL Server 2005 °²×°²»Í¬¶ø²»Í¬,
MSSQL.1 ÊÇռλ·û£¬¶ÔÓ¦Êý¾Ý¿âʵÀýID¡£
4.¶Ôÿ¸öÐèÒª´ò¿ªÔ¶³Ì·ÃÎʵÄSQL Server 2005 ʵÀý£¬Öظ´²½Öè 1 ÖÁ 3¡£
ÁíÍâ,·À»ðǽÀýÍâÖÐÐè Ìí¼Ó ¶Ë¿Ú£º1434£¬UDP, Õâ¸ö¶Ë¿ÚÊÇsql server BrowserÌṩ·þÎñµÄ¶Ë¿Ú,µ±Ëü¸ºÔð½âÊÍsql
serverµÄ¶Ë¿Ú.Ìí¼ÓÁËÕâ¸ö¶Ë¿Úµ½ÀýÍ
Ïà¹ØÎĵµ£º
POEAAÖнéÉÜÁËORMÖÐ×îÖØÒªµÄģʽ֮һ£ºUnit Of Work¡£¿´ËƼòµ¥£¬ÊµÏÖÆðÀ´È´·Ç³£¸´ÔÓ¡£
HibernateÍêÃÀµÄʵÏÖÁËÕâ¸öģʽ¡£ÒÔÏÂÎÒÓÃһϵÁеÄÀý×ÓÀ´·ÖÎöHibernateµÄ´¦Àí»úÖÆ
ÏÂÃæÓÐÈý¸öÀý×Ó£¬²Â²Â¿´Hibernate»áÖ´Ðм¸¾äSQL(Ê¡ÂÔÊÂÎñ´¦Àí´úÂ룬ʵÌå¶ÔÏó½ÐUser£¬¼ÙÉèÖ÷¼üÊÇ×ÔÔöÐ͵Ä)
Àý1:
User user = new User();
user.setN ......
************************************************************
*
ASCII
--
->ASCII ( character_expression ) --->·µ»Ø×Ö·û±í´ïʽ×î×ó¶Ë×Ö·ûµÄ ASCII ´úÂëÖµ¡£
*
select
ascii
(
'
abcdef
'
)
*
CHAR
--
->CH ......
1. ¸ÅÊö
MySQLÊý¾Ý¿âµÄµ¼È룬ÓÐÁ½ÖÖ·½·¨£º
1) Ïȵ¼³öÊý¾Ý¿âSQL½Å±¾£¬ÔÙµ¼È룻
2) Ö±½Ó¿½±´Êý¾Ý¿âĿ¼ºÍÎļþ¡£
ÔÚ²»Í¬²Ù×÷ϵͳ»òMySQL°æ±¾Çé¿öÏ£¬Ö±½Ó¿½±´ÎļþµÄ·½·¨¿ÉÄÜ»áÓв»¼æÈݵÄÇé¿ö·¢Éú¡£
ËùÒÔÒ»°ãÍƼöÓÃSQL½Å±¾ÐÎʽµ¼Èë¡£ÏÂÃæ·Ö±ð½éÉÜÁ½ÖÖ·½·¨¡£
Linux주
2. ·½·¨Ò» SQL½Å±¾ÐÎʽ
²Ù×÷²½ÖèÈçÏ£º
2 ......
SQL UNION ²Ù×÷·û
UNION ²Ù×÷·ûÓÃÓںϲ¢Á½¸ö»ò¶à¸ö SELECT Óï¾äµÄ½á¹û¼¯¡£
Çë×¢Ò⣬UNION ÄÚ²¿µÄ SELECT Óï¾ä±ØÐëÓµÓÐÏàͬÊýÁ¿µÄÁС£ÁÐÒ²±ØÐëÓµÓÐÏàËƵÄÊý¾ÝÀàÐÍ¡£Í¬Ê±£¬Ã¿Ìõ SELECT Óï¾äÖеÄÁеÄ˳Ðò±ØÐëÏàͬ¡£
SQL UNION Óï·¨
SELECT column_name(s) from table_name1
UNION
SELECT column_name(s) from table_na ......
select * from tt t inner loop join ss s with(nolock) on s.c=t.c
ʹÓà nested join
select * from tt t inner merge join ss s with(nolock) on s.c=t.c
ʹÓà merge join
select * from tt t inner hash join ss s with(nolock) on s.c=t.c
ʹÓà hash jion
&n ......