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

Êý¾Ý¿âÉè¼Æ£¨6£©_ÃüÃû¼°±àÂë¹æ·¶_SQL SERVER

Ò»¡¢×ÛÊö
ÃüÃûºÍ±àÂë¹ý³ÌÖУ¬¶¨ÒåÓÐÒâÒåµÄÃû³Æ£¬ÒÔÒ×ÓÚÀí½â¡¢·½±ãÊéдΪԭÔò¡£
£¨1£©±ÜÃâʹÓÃÖÐÎÄ£¬¾¡Á¿Ê¹ÓÃÈ«Æ´Òô»òÈ«Ó¢ÎÄ£¬ÒÔ·½±ã¹ú¼Ê»¯£»
£¨2£©±ÜÃâÆ´ÒôºÍÓ¢ÎĵÄÖÐÎ÷ºÏèµ£¬È磺CAOZUO_TIME£»
£¨3£©±ÜÃâÔÚÃüÃûÖаüÀ¨¿Õ¸ñ¼°ÌØÊâ×Ö·û£»
£¨4£©±ÜÃâʹÓñ£Áô×Ö£»
£¨5£©±ÜÃâÃû³ÆÌ«³¤£¬×¢ÒâËõдµÄʹÓã¬Ëõд¹æÔòΪµ¥´ÊÇ°4¸ö×Öĸ£¬ºÏ³É´Êȡÿ¸öµ¥´ÊÇ°Á½Î»×é³É4λËõд£¬¶ÔÓÚÔ¼¶¨Êø³ÉµÄËõд²»±Ø×ñÊØÈ¡4λµÄ¹æÔò£¬±ÈÈ磺NO´ú±íNUMBER£¬Èç¹ûÈ¡NUMB·´¶øÈÃÈ˷ѽ⡣
 
¶þ¡¢ÃüÃû¹æ·¶
2.1¡¢Êý¾Ý¿â
ǰ׺£ºÊ¹ÓÃÓëÊý¾Ý¿âÒµÎñ¶ÔÏóÏà¶ÔÓ¦µÄÓ¢Îĵ¥´Ê»òÓ¢ÎÄËõд£»
Ãû³Æ£ºÊ¹ÓÃÓëÊý¾Ý¿âÒµÎñÐÔÖÊÏà¶ÔÓ¦µÄÓ¢Îĵ¥´Ê»òÓ¢ÎÄËõд£»
¾ÙÀý£ºBHO_STATISTIC
×¢Ò⣺
£¨1£©Ãû³ÆÒ»ÂÉʹÓõ¥ÊýÐÎʽ£»
£¨2£©¶¯´ÊÒ»Âɱ£³Ö¶¯±ö½á¹¹£¬Í¨³£Ôö¡¢É¾¡¢¸Ä¡¢²é¡¢Í³¼ÆµÄ¶¯×÷£¬Ê¹ÓÃADD¡¢DEL¡¢UPD¡¢QRY¡¢STA×÷ΪËõд£¬ÒÔ½µµÍÃüÃûµÄ³¤¶È£»
 
2.2¡¢Êý¾Ý¿âÎļþ¼°Îļþ×é
£¨1£©Êý¾Ý¿âÎļþ´æ·Å·¾¶£ºD:\DATA¡¢E:\LOG£»
£¨2£©Êý¾Ý¿âÎļþ×éÃüÃû£ºÖ÷Îļþ×é PRIMARY,´ÎÎļþ×é FG_ÒµÎñÄ£¿é_Êý¾Ý·ÖÀ࣬È磺FG_CONFIG_ACCOUNT£»
£¨3£©Êý¾Ý¿âÖ÷Êý¾ÝÎļþÃüÃû£ºDBNAME_DATA.MDF£¬È磺BHO_STATISTIC_DATA.MDF£»
£¨4£©Êý¾Ý¿â´ÓÊý¾ÝÎļþÃüÃû£ºDBNAME_DATA_XX.NDF£¬XXΪÁ½Î»ÕûÊý£¬²»×ãÁ½Î»µÚ1λÓÃ0²¹Æ룬È磺BHO_STATISTIC_DATA_01.NDF£»
£¨5£©Êý¾Ý¿âÈÕÖ¾ÎļþÃüÃû£ºDBNAME_LOG_XX.LDF£¬XXΪÁ½Î»ÕûÊý£¬²»×ãÁ½Î»µÚ1λÓÃ0²¹Æë,È磺BHO_STATISTIC_LOG_01.LDF£»
 
2.3¡¢Êý¾Ý¿âÂß¼­¶ÔÏó
2.3.1¡¢¼Ü¹¹
ͨ³£Ê¹ÓÃÒµÎñÄ£¿éÃû×÷Ϊ¼Ü¹¹Ãû£¬È磺ÅäÖÃÄ£¿é£¨CONFIG£©¡£
£¨1£©·½±ãÊý¾Ý¿â¶ÔÏó·ÖÀࣻ
£¨2£©·½±ãȨÏÞ¹ÜÀí¡£
 
2.3.2¡¢±í
ǰ׺¡¢Ãû³Æ¡¢ºó׺¾ùÒÔÏ»®Ïß(_)¼ä¸ô£¬×Öĸ¾ùʹÓôóд¡£
£¨1£© ʵÌå±í
ǰ׺£ºETB£¨E±íʾENTITY£©
Ãû³Æ£º¼Ü¹¹Ãû.ETB_Ãû´Ê
¾ÙÀý£ºPUBLIC.ETB_LEAGUE
 
£¨2£©¹Øϵ±í
ǰ׺£ºRTB£¨R±íʾRELATION£©
Ãû³Æ£º¼Ü¹¹Ãû.RTB_ʵÌåÓ¢Îĵ¥´ÊËõд_ʵÌåÓ¢Îĵ¥´ÊËõд[_ʵÌåÓ¢Îĵ¥´ÊËõд…]
¾ÙÀý£ºPUBLIC.RTB_HOPA_LEAG(¼´CONFIG.RTB_HOMEPAGE_LEAGUE)
 
£¨3£©ÊÂʵ±í
ǰ׺£ºFACT
Ãû³Æ£º¼Ü¹¹Ãû.FACT_¶¯±ö½á¹¹
¾ÙÀý£ºCONFIG.FACT _ADD_USER
 
£¨4£©±¨±í
ǰ׺£ºRPT£¨REPORTµÄ¼òд£©
Ãû³Æ£º¼Ü¹¹Ãû.RPT_¶¯±ö½á¹¹
¾ÙÀý£ºCONFIG.RPT_ ADD_USER
 
£¨5£©×Ö¶Î
Ãû³Æ£º´Ê_´Ê£¬È«²¿´óд
¾ÙÀý£ºFIRST_NAME
×¢Ò⣺
a)±ÜÃâ×Ö¶ÎÃûÖаüº¬±íÃû£¬Èç


Ïà¹ØÎĵµ£º

¾­µäSQLÓï¾ä´óÈ«

ת×Ô£ºhttp://www.sqlkey.cn/sql-yuju/sql_yuju.html
 
Ò»¡¢»ù´¡
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾Ý¿â
drop database dbname
3¡¢ËµÃ÷£º±¸·Ýsql server
--- ´´½¨ ±¸·ÝÊý¾ÝµÄ device
USE master
EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwind_1.d ......

SQL Server 2005 T SQL ÖеÄOUTPUT×Ó¾äÓï·¨

OUTPUT×Ó¾äÊÇSQL Server 2005 ÖжÔINSERT¡¢UPDATEºÍDELETEÐÂÔöµÄ£¬½ñÌì¿´¼ûÔ°×ÓÀïÓÐÈËÌáÆð(SQL2005Öзµ»ØÐ޸ĺóµÄÊý¾Ý)£¬¾ÍÔÚÕâÀï¼Ç¼һÏÂËüµÄÓï·¨¡£
 OUTPUT { DELETED | INSERTED | from_table_name }. {* | column_name } [,...n]
  &nbs ......

ÓÃSQL²éѯ·ÖÎöÆ÷²Ù×ÝExcel¼°µ¼Èëµ¼³öÊý¾Ý

SQL SERVER ºÍEXCELµÄÊý¾Ýµ¼Èëµ¼³ö
ͨ³£µÄ·½·¨ÊÇʹÓÃͼÐνçÃæµÄdts¹¤¾ß£¬µ«·¢¾õÓÐЩʹÓÃÃüÁîÐнçÃæµÄ·½Ê½¸ü¼òµ¥
1¡¢ÔÚSQL SERVERÀï²éѯExcelÊý¾Ý:
-- ======================================================
SELECT *
from OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\book1.xls";Use ......

sql Óï¾äʹÓÃ

SQLÓï¾ä(Ôö¡¢É¾¡¢¸Ä¡¢²é)
¡¡¡¡
¡¡¡¡Ò»¡¢Ôö£ºÓÐ4ÖÖ·½·¨
¡¡¡¡
¡¡¡¡1.ʹÓÃinsert²åÈëµ¥ÐÐÊý¾Ý£º
¡¡¡¡
¡¡¡¡Óï·¨£ºinsert [into] <±íÃû> [ÁÐÃû] values <ÁÐÖµ>
¡¡¡¡
¡¡¡¡Àý£ºinsert into Strdents (ÐÕÃû,ÐÔ±ð,³öÉúÈÕÆÚ) values ('¿ªÐÄÅóÅó','ÄÐ','1980/6/15')
¡¡¡¡
¡¡¡¡×¢Ò⣺into¿ÉÒÔÊ¡ÂÔ£»ÁÐÃûÁÐÖµÓöºº ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ