Access ´íÁË£¬»¹ÊÇÎÒɵÁË
×î½üϵͳÔËÐÐÖз¢ÏÖAccess 2003 °æ±¾ÖжԴý Null ºÍ ‘’ £¨¿Õ×Ö·û£©Ææ¹ÖÎÊÌ⣬ÖØÏÖ²½Ö裺
1¡¢´´½¨±ítabTest £»
2¡¢Ê¹ÓÃÉè¼ÆÊÓͼÌí¼ÓÁ½¸ö×ֶΠID £¬col1
Ãû³Æ
ÀàÐÍ
³¤¶È
˵Ã÷
ID
Number
Ö÷¼ü£¬×ÔÔö
Col1
char
1
ÎÞ
3¡¢Ê¹ÓÃsql Ìí¼ÓÈçÏÂÊý¾Ý
-- col1 ×Ö¶ÎÉèÖÃΪ null
INSERT INTO tabtest (id, col1) VALUES(1, NULL);
-- col1 ×Ö¶ÎÉèÖÃΪ ‘’
INSERT INTO tabtest (id, col1) VALUES(2, '');
-- col1 ×Ö¶ÎÉèÖÃΪ ‘a’
INSERT INTO tabtest (id, col1) VALUES(3, 'a');
4¡¢ÖØн¨Á¢²éѯÇëÇó£¬Í¨¹ý sql Ìí¼ÓÐÂ×ֶΠcol2
-- Ìí¼ÓÐÂÁÐcol2
ALTER TABLE tabTest ADD COLUMN col2 CHAR(1);
5¡¢Ê¹ÓÃÈçÏÂsql ÔÙ´ÎÏò tabTest Ìí¼ÓÐÂÊý¾Ý
-- col1£¬col2 ×Ö¶ÎÉèÖÃΪ null
INSERT INTO tabtest(id, col1, col2) VALUES(4, NULL, NULL);
-- col1£¬col2 ×Ö¶ÎÉèÖÃΪ ‘’
INSERT INTO tabtest(id, col1, col2) VALUES(5, '', '');
-- col1£¬col2 ×Ö¶ÎÉèÖÃΪ ‘a’
INSERT INTO tabtest(id, col1, col2) VALUES(6, 'a', 'a');
6¡¢´ò¿ª tabTest ¼ì²é Id Ϊ 5 µÄÊý¾Ý¡£ÉñÆæµÄÊÂÇé·¢ÉúÁË¡£
col1 ×Ö¶ÎΪ ³¤¶ÈΪ0 µÄ¿Õ×Ö·û´®£¬¶ø col2 Ϊ³¤¶ÈΪ1 µÄ×Ö·û
ÎÊÌ⣺
Q1¡¢ÎªºÎ ID Ϊ 2 µÄcol1 ×ֶΠºÍ col2 ×ֶζ¼Êdz¤¶ÈΪ 0 µÄ¿Õ×Ö·û£¬
¶ø ID Ϊ 5 µÄcol1 ×ֶΠºÍ col2 ×ֶγ¤¶È·Ö±ðΪ 0, 1 µÄ¿Õ×Ö·û£¬
ÔËÐÐÈçÏÂsql µÃµ½ÈçϽá¹û£º
SELECT id, len(col1) AS col1_³¤¶È, len(col2) AS col2_³¤¶È
from tabtest
WHERE id IN (2, 5);
Q2¡¢Í¨¹ýÈçÏÂsql È´Äܵõ½ID Ϊ5 µÄ¼Ç¼
SELECT *
from tabtest
WHERE col1 = ''
AND col2 = '';
Ïà¹ØÎĵµ£º
ת×Ô
http://topic.csdn.net/t/20050110/09/3711952.html
accessÖÐʱ¼äÒªÓÃ#,²»ÊÇË«ÒýºÅ
select * from kc where rq < #2000-01-01# and rq>#2002-01-01#
²»ÒªÓÃbetween,ËüµÄЧÂÊÌ©µÍ
ʹÓÃ# ¶ø²»ÊÇ ......
²éѯÓï¾äÖ»ÒªÕâÑùд,¾Í¿ÉÒÔËæ»úÈ¡³ö¼Ç¼ÁË
SQL="Select top 6 * from Dv_bbs1 where isbest = 1 and layer = 1 order by newID() desc"
ÔÚACCESSÀï
SELECT top 15 id from tablename order by rnd(id)
SQL Server£º
Select TOP N * from TABLE Order By NewID()
Access£º
Select TOP N * from TABLE Order By Rnd(ID ......
VB´´½¨ACCESSÊý¾Ý¿âÈ«½â ¶¯Ì¬´´½¨Êý¾Ý¿â¡¢´´½¨±í£¬´´½¨¼Ç¼ ADO¡¢ADOX2009Äê04ÔÂ20ÈÕ ÐÇÆÚÒ» 10:17ÕªÒª£º ±¾ÎIJûÊöÁËÔÚVB³ÌÐòÖÐÀûÓÃADO¶ÔÏó¶¯Ì¬´´½¨Êý¾Ý¿âºÍÊý¾Ý±íµÄ·½·¨£¬ÕâЩ·½·¨ÔÚ¿ª·¢VBÊý¾Ý¿âÓ¦ÓóÌÐòÖкÜÓÐʵÓüÛÖµ£¬Ëü¿ÉÒÔÌá¸ßÊý¾Ý¿â³ÌÐòÁé»îÐÔ¡£
¡¡¡¡¹Ø¼ü´Ê£ºÊý¾Ý¿â¡¢Êý¾Ý±í¡¢ADO¡¢ADOX
¡¡¡¡1: ÎÊÌâµÄÌá³ö
¡¡¡¡Ô ......
ÔÎÄ£ºhttp://blog.sina.com.cn/s/blog_5fdcf5c90100fher.html
AccessÊý¾Ý¿â“×Ô¶¯±àºÅ”×ֶιéÁã
AccessÊý¾Ý¿â“×Ô¶¯±àºÅ”Êý¾ÝÀàÐÍÊÇÒ»¸ö·Ç³£ÊµÓõÄÀàÐÍ£¬Ëü¿ÉÒԺܷ½±ãµØ°ïÖúÎÒÃÇÍê³É±êʶ²»Í¬¼Ç¼IDµÄ¹¤×÷¡£µ«ÊÇÓÉÓÚJETÒýÇæµÄÌØÐÔ£¨SQL serverʹÓÃT-SQL£©£¬µ±ÎÒÃÇÔÚAccessÊý¾Ý¿âijÕűíÖÐÖ´ÐÐÁËɾ ......
C#ÖзÃÎʹؼü×Ö£¨access keyword£©ÓÐÁ½¸ö£ºbase¡¢this
1.base
ÓÃÓÚ´ÓÅÉÉúÀàÖзÃÎÊ»ùÀàµÄ³ÉÔ±£¬°üÀ¨£º
a.µ÷ÓûùÀàÉÏÒѱ»ÆäËü·½·¨ÖØд£¨override£©µÄ·½·¨¡£
b.Ö¸¶¨´´½¨ÅÉÉúÀàʵÀýʱӦµ÷ÓõĻùÀ๹Ô캯Êý¡£
×¢Ò⣺¶Ô»ùÀàµÄ·ÃÎÊÖ»ÄÜ ......