SqlServerÃüÃû¹æ·¶
SqlServerÃüÃû¹æ·¶
²Î¿¼¸÷ÖÖÃüÃû¹æ·¶£¬ÎÒÃÇͳһʹÓÃÃüÃû¹æ·¶ÈçÏ£º
ÃüÃû¹ý³ÌÖÐÈçÓÐÏÖ´æµÄËõд£¬ÔòʹÓøÃËõд£¬ÈçÎÞ£¬Ò»Âɲ»µÃËõд£¬Àý£ºISBN
Êý¾Ý¿â£ºÓÃÒ»¸ö»òÈý¸öÒÔÏÂÓ¢Îĵ¥´Ê×é³É£¬µ¥´ÊÊ××Öĸ´óд£¬È磺DepartmentManage£»
±íÃû£ºÊ¹ÓÃÃû´ÊÐÔÖʵĵ¥´ÊÈ«Æ´±íʾ£¬¸÷µ¥´ÊÊ××Öĸ´óд£¬ ʹÓø´ÊýÐÎʽ£¬È磺Books
Èç¹û¸Ã±íÓÃÓÚ±íÃ÷ÁíÍâÁ½±íÖÐ×ֶμäµÄ¹Øϵ£¬Óõ¥Êý(¼´±íÃ÷ʵÌå¼äµÄ¹ØϵµÄ±íÓõ¥ÊýÃüÃû),µ¥´ÊÖмäÎÞ“and of in”Ö®ÀàµÄ½é´Ê
È磺BookAuthor
==============================================================================================
1. ±íÖеÄ×Ö¶ÎÒ»°ãʹÓÃÃû´ÊÐÔÖʵĵ¥´ÊÈ«Æ´±íʾ£¬²ÉÓÃÒ»¸ö»òÈý¸öÒÔÏÂÓ¢Îĵ¥´Ê×é³É£¬µ¥´ÊÊ××Öĸ´óд£¬È磺UserName;
2. ±íÖ÷¼üÃû³ÆΪ£º±íÃû+ID£¬ÈçDocument±íµÄÖ÷¼üÃûΪ£ºDocumentID
3. Íâ¼üÃû³Æλ£ºÖ÷±íÃû+¶ÔÓ¦ÁÐÃû£¬È磺DepartmentsID£¬ËµÃ÷ÈçÏ£º
ÔÚ±íDepartmentsÖУ¬Æä×Ö¶ÎÓУºID, DepartmentName
ÔÚ±íUserInfoÖУ¬Æä×Ö¶ÎÓУºUserId,UserName,DepartmentsID DepartmentsIDΪÍâ¼ü
4. ±íÖÐ×Ô¶¯Ôö³¤µÄÁÐÒ»ÂÉÃüÃûΪ£ºID£»
5. Èç¹û×Ö¶ÎΪboolÐÍ£¬ÔòʹÓÃ"IsShow","IsValid","HasPassed","HasExamined","IgnoreCase"ÕâÖÖÐÎʽ±íʾ
6. Èç¹û×Ö¶ÎλDateTimeÐÍ£¬ÇÐÇÒĬÈÏÖµÊÇȡϵͳʱ¼ä£¬Ò»ÂÉÃüÃûλ£ºCheckDate
7. StatusΪ±íÖÐ״̬µÄÁÐÃû£¬Ä¬ÈÏֵΪ0£¬ÔÚ±íÖÐɾ³ý²Ù×÷½«»á¸Ä±äStatusµÄÖµ¶ø²»Õæʵɾ³ý¸Ã¼Ç¼£»
8. ´æ´¢¹ý³ÌÃüÃû£ºsp_±íÃû_·½·¨,È磺sp_News_Add,sp_News_Update;
9. ÊÓͼÃüÃû£ºvi_±íÃû£¬È磺vi_News;
10. ±í¡¢´æ´¢¹ý³Ì¡¢ÊÓͼµÈ¶ÔÏóµÄËùÓж¼Îªdbo£¬²»ÒªÊ¹ÓÃÊý¾Ý¿âÓû§Ãû£¬ÕâÑù»áÓ°ÏìÊý¾Ý¿âÓû§µÄ¸ü¸Ä
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/patrickpan/archive/2007/05/29/1629831.aspx
Ïà¹ØÎĵµ£º
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/yf520gn/archive/2008/09/26/2982363.aspx
SELECT * from TB_MILES_CB_ORDER
WHERE convert(varchar(100),ORDER_DATE,102)= £¿
ORDER BY ORDER_NO
SELECT CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM
SELECT CONVERT(varchar(100), GETDATE ......
1.Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)¡¡¡¡
¡¡¡¡ SQLSERVERµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬Òò´Ëfrom×Ó¾äÖÐдÔÚ×îºóµÄ±í£¨»ù´¡±ídriving table£©½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏ£¬±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í£¬µ±SQLSERVER´¦Àí¶à¸ö±íʱ£¬»áÔËÓÃÅÅÐò¼°ºÏ²¢µÄ·½Ê½Á ......
SQLserver×Ö·û´®·Ö¸îº¯Êý
Ò»¡¢°´Ö¸¶¨·ûºÅ·Ö¸î×Ö·û´®£¬·µ»Ø·Ö¸îºóµÄÔªËظöÊý£¬·½·¨ºÜ¼òµ¥£¬¾ÍÊÇ¿´×Ö·û´®ÖдæÔÚ¶àÉÙ¸ö·Ö¸ô·ûºÅ£¬È»ºóÔÙ¼ÓÒ»£¬¾ÍÊÇÒªÇóµÄ½á¹û¡£
CREATE function Get_StrArrayLength
(
@str varchar(1024), --Òª·Ö¸îµÄ×Ö·û´®
@split varchar(10) --·Ö¸ô·ûº ......
sqlserver×Ö·û´®²ð·Ö(split)·½·¨»ã×Ü
--·½·¨0£º¶¯Ì¬SQL·¨
declare @s varchar(100),@sql varchar(1000)
set @s='1,2,3,4,5,6,7,8,9,10'
set @sql='select col='''+ replace(@s,',',''' union all select ''')+''''
PRINT @sql
exec (@sql)
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ ......