SQL Server Öвéѯ·ÇÖÐÎÄ£¬·ÇÓ¢ÎÄ£¬·ÇÊý×ÖµÄÌØÊâÁÐ
½ñÌìÔÚ´¦ÀíÒ»¸öÓû§ÃûÊý¾Ý¿âʱ£¬·¢ÏÖÓÐЩ²»Õý³£µÄÊý¾Ý´æÔÚ£¬°´ÕÕÂß¼£¬Óû§ÃûÖ»ÄÜÊÇÊý×Ö£¬×Öĸ£¬Ï»®Ïߺʹ¿ÖÐÎÄÕâÑùµÄ×Ö·û×éºÏ´æÔÚ£¬²»Ó¦¸ÃÓÐÆäËû×éºÏ´æÔÚ£¬µ«ÊÇ·¢ÏÖÊý¾Ý¿âÖÐÓÉÓÚ¸÷ÖÖÀúÊ·ÔÒò£¬ÓÐЩ²»Õý³£µÄ´æÔÚ£¬ÈçºÎÕÒµ½ÕâЩÒì³£Êý¾Ý£¬ÔÚCSDNµÄ SQL Server °æÎÊÁËÕâÑùÁ½¸öÎÊÌ⣬ÈçÏ£º http://topic.csdn.net/u/20100111/14/529a21a1-3ea8-4263-a0d9-34e83be79b1d.html http://topic.csdn.net/u/20100111/15/c2a124c5-bc5b-4626-86ce-c5b862cf5cff.html ¸ÐлCSDNµÄÍøÓѰïæ½â¾öÁËÕâ¸öÎÊÌ⣬ÏÂÃæ¾ÍÊǽâ¾ö·½·¨µÄ»ã×Ü£º if object_id('[t1]') is not null
drop table [t1]
create table [t1]([c] nvarchar(20))
insert [t1]
select 'aaa' union all -- ´ËÊý¾Ý²»Ó¦¸Ã±»ËÑË÷µ½
select 'bcds' union all -- ´ËÊý¾Ý²»Ó¦¸Ã±»ËÑË÷µ½
select 'a1' union all -- ´ËÊý¾Ý²»Ó¦¸Ã±»ËÑË÷µ½
select '°¡' union all -- ´ËÊý¾Ý²»Ó¦¸Ã±»ËÑË÷µ½
select '^%' union all -- Ó¦¸ÃËÑË÷µ½
select 'ew1' union all -- ´ËÊý¾Ý²»Ó¦¸Ã±»ËÑË÷µ½
select '344' union all -- ´ËÊý¾Ý²»Ó¦¸Ã±»ËÑË÷µ½
select '__' union all -- ´ËÊý¾Ý²»Ó¦¸Ã±»ËÑË÷µ½
select '213_21' union all -- ´ËÊý¾Ý²»Ó¦¸Ã±»ËÑË÷µ½
select 'a_2' union all -- ´ËÊý¾Ý²»Ó¦¸Ã±»ËÑË÷µ½
select 'd' union all -- ´ËÊý¾Ý²»Ó¦¸Ã±»ËÑË÷µ½
select 'ddd' union all -- ´ËÊý¾Ý²»Ó¦¸Ã±»ËÑË÷µ½
select 'µç·çÉÈ' union all -- ´ËÊý¾Ý²»Ó¦¸Ã±»ËÑË÷µ½
select '¡ï˼º®¡ï' union all -- Ó¦¸ÃËÑË÷µ½
select 'Ω' union all -- Ó¦¸ÃËÑË÷µ½
select '¥È¥ó¥È¥ó' union all -- Ó¦¸ÃËÑË÷µ½
select '***' union all -- Ó¦¸ÃËÑË÷µ½
select '///////' union all -- Ó¦¸ÃËÑË÷µ½
select '@-@' union all -- Ó¦¸ÃËÑË÷µ½
select '@С»Û' union all -- Ó¦¸ÃËÑË÷µ½
select '~*Ïþ¾Õ*~' union all -- Ó¦¸ÃËÑË÷µ½
select '°¡¡ïÂå' union all -- Ó¦¸ÃËÑË÷µ½
select '²»Ë¼議¤ÎÒ¹' union all -- Ó¦¸ÃËÑË÷µ½
select '(¼Î±ö)ºú·É' union all -- Ó¦¸ÃËÑË÷µ½
select '--------------' -- Ó¦¸ÃËÑË÷µ½
select * from [t1] WHERE PATINDEX('%[0-9a-z_]%',c)=0
and PATINDEX('%[^ß¹-×ù]%',c) 0
ÁíÍâ¸Ð¿®Ò»Ï£¬CSDNµÄ SQL Server °æ ÎʳöÎÊÌâµ½½â¾öÎÊÌ⣬¾¹È»±ÈGoogle ËÑË÷´ð°¸»¹Òª¿ì£¬ SQL Server °æ µÄÅ£ÈËÕæ¶à£¬ ¶øÇһشðµÄÕâô¿ì£¬ÊµÔÚÈÃÈ˳Ծª¡£
Ïà¹ØÎĵµ£º
1. ²é¿´Êý¾Ý¿âµÄ°æ±¾
select @@version
2. ²é¿´Êý¾Ý¿âËùÔÚ»úÆ÷²Ù×÷ϵͳ²ÎÊý
exec master..xp_msver
3. ²é¿´Êý¾Ý¿âÆô¶¯µÄ²ÎÊý
......
·µ»Ø´ú±íÖ¸¶¨ÈÕÆÚµÄÖ¸¶¨ÈÕÆÚ²¿·ÖµÄÕûÊý¡£
Óï·¨
DATEPART ( datepart ,date )
²ÎÊý
datepart
ÊÇÖ¸¶¨Ó¦·µ»ØµÄÈÕÆÚ²¿·ÖµÄ²ÎÊý¡£Ï±íÁгöÁË Microsoft® SQL Server™ ʶ±ðµÄÈÕÆÚ²¿·ÖºÍËõд¡£
ÈÕÆÚ²¿·ÖËõд
year
yy, yyyy
quarter
qq, q
month
mm, m
dayofyear
dy, y
day
dd, d
week
wk, ww
weekda ......
ÄÚÈÝת×Ô£ºhttp://david.btbbt.blog.163.com/blog/static/205989372009973357418/
µÇ¼Զ³ÌSQL·þÎñÆ÷
Ò» ¿´ping ·þÎñÆ÷IPÄÜ·ñpingͨ¡£
¡¡¡¡Õâ¸öʵ¼ÊÉÏÊÇ¿´ºÍÔ¶³Ìsql server 2000·þÎñÆ÷µÄÎïÀíÁ¬½ÓÊÇ·ñ´æÔÚ¡£Èç¹û²»ÐУ¬Çë¼ì²éÍøÂ磬²é¿´ÅäÖ㬵±È»µÃÈ·±£Ô¶³Ìsql server 2000·þÎñÆ÷µÄIPƴдÕýÈ·¡£
¡¡¡¡¶þ ÔÚDos»òÃüÁîÐÐ ......
2009-12-08 18:53
sql½Å±¾Êǰüº¬Ò»µ½¶à¸ösqlÃüÁîµÄsqlÓï¾ä£¬ÎÒÃÇ¿ÉÒÔ½«ÕâЩsql½Å±¾·ÅÔÚÒ»¸öÎı¾ÎļþÖУ¨ÎÒÃdzÆÖ®Îª“sql½Å±¾Îļþ”£©£¬È»ºóͨ¹ýÏà¹ØµÄÃüÁîÖ´ÐÐÕâ¸ösql½Å±¾Îļþ¡£»ù±¾²½ÖèÈçÏ£º
1¡¢´´½¨°üº¬sqlÃüÁîµÄsql½Å±¾Îļþ
ÎļþÖаüº¬Ò»Ð©ÁеÄsqlÓï¾ä£¬Ã¿ÌõÓï¾ä×îºóÒÔ;½á⣬ÎļþÄÚÈÝʾÀýÈçÏ£º
--´´½ ......