python·ÃÎÊ sql server
½ñÌìÊÔÑéʹÓÃpythonÁ¬½Ó sql server ·þÎñÆ÷¡£ÎҼǵÃÒÔǰʹÓÃadoÁ¬½Óaccess·Ç³£Ë³Àû£¬µ«ÊǽñÌìʹÓÃadoÁ¬½Ósql server¾¹È»²»³É¹¦¡£ÔÚpythonÀïÃæµÄ³ö´íÐÅÏ¢¶¼ÏÔÊ¾Îª×ªÒÆÐòÁУ¬·ÑÁ˰ëÌì¾¢²Å¸ãÃ÷°×£ºÎÞЧµÄÀà±ð×Ö·û´®¡£
ÊÇÁ¬½Ó×Ö·û´®Â𣿲âÊÔÁ˺ü¸¸ö È·ÈÏÎÞÎóµÄÊý¾Ý¿âÁ¬½Ó×Ö·û´®£¬Ò²ÊÇÈç´Ë ¡£ÉÏÍøËÑË÷£¬ÊÇÓпÉÄÜÊÇ comµÄÀà±ð×Ö·û´®¡£ÖØÐÂ×¢²á msado15.dll Îļþ£¬¾¹È»Õý³£ÁË¡£Ææ¹Ö£¬Ê²Ã´Ê±ºò¾¹È»¶ªÊ§ÁËÕâЩע²áÐÅÏ¢ÄØ£¿
Ïà¹ØÎĵµ£º
1.×Ö·û´®º¯Êý
³¤¶ÈÓë·ÖÎöÓÃ
datalength(Char_expr) ·µ»Ø×Ö·û´®°üº¬×Ö·ûÊý,µ«²»°üº¬ºóÃæµÄ¿Õ¸ñ
substring(expression,start,length) ²»¶à˵ÁË,È¡×Ó´®
right(char_expr,int_expr) ·µ»Ø×Ö·û´®ÓÒ±ßint_expr¸ö×Ö·û
×Ö·û²Ù×÷Àà
upper(char_expr) תΪ´óд
lower(char_expr) תΪСд
space(int_expr) Éú³Éint_expr¸ ......
--´´½¨Ò»Õűí
create table stut
(
id int,
na varchar(20)
)
--²åÈë4ÌõÊý¾Ý¡£
insert into stut values(1,'aa')
insert into stut values(2,'bb')
insert into stut values(3,'df')
insert into stut values(4,'Öйú')
select * from stut
--¸ù¾Ý'df,aa,Öйú,bb'À´½øÐÐÅÅÐò
select * from stut ......
´¥·¢Æ÷ʵ¼ÊÉϾÍÊÇÒ»ÖÖÌØÊâÀàÐ͵Ĵ洢¹ý³Ì£¬ÆäÌØÊâÐÔ±íÏÖÔÚ£ºËüÊÇÔÚÖ´ÐÐÌØ¶¨µÄT-SQL ×Ô¶¯Ïà¼ÓµÄ¡£
´¥·¢Æ÷·ÖΪÁ½Àࣺ
&nbs ......
SQL SERVER 2005 ¼ò½é
Ò»Ö±ÒÔÀ´£¬T-SQL¶¼ÊÇÈÝÒ×ÉÏÊֵĽṹ»¯²éѯÓïÑÔ£¬Ëæ×ÅSQL ServerµÄ°æ±¾Ñݽø£¬³ýÁËÄÚ²¿¹¦ÄÜÔö¼Ó£¬
T-SQLÒ²´ó·ùÀ©ÔöÁËеIJéѯָÁî¡£ÀýÈ磺XQuery¡¢È¡µÃÅÅÃû˳ÐòµÄº¯Êý¡¢¼¯ºÏÔËËã´îÅäOVERÔËËã·û¡¢TOPÔËËã·û¿ÉÒÔ´îÅä±äÁ¿»ò×Ó²éѯ£¬ÒÔ¼°Í ......
Èç¹û½á¹ûµÄ³¤¶È´óÓÚ·þÎñÆ÷²ÎÊýmax_allowed_packet£¬×Ö·û´®Öµº¯Êý·µ»ØNULL¡£¼û10.2.3 µ÷½Ú·þÎñÆ÷²ÎÊý¡£
¶ÔÓÚÕë¶Ô×Ö·û´®Î»ÖõIJÙ×÷£¬µÚÒ»¸öλÖñ»±ê¼ÇΪ1¡£
ASCII(str)
·µ»Ø×Ö·û´®strµÄ×î×óÃæ×Ö·ûµÄASCII´úÂëÖµ¡£Èç¹ûstrÊÇ¿Õ×Ö·û´®£¬·µ»Ø0¡£Èç¹ûstrÊÇNULL£¬·µ»ØNULL¡£
mysql> select ASCII('2');
-> ......