ACCESS SQLÓï·¨²Î¿¼
ACCESS SQLÓï·¨²Î¿¼
=================
Ò». »ù´¡¸ÅÄî
¿ÉÒÔʹÓõÄÊý¾ÝÀàÐÍÈçÏ£º
1. TEXT£ºÎı¾ÐÍ£¨Ö¸¶¨³¤¶Èʱ£©£¬±¸×¢ÐÍ£¨²»Ö¸¶¨³¤¶Èʱ£©£»
2.
CHAR£¬NCHAR£¬VARCHAR£¬NVARCHAR£ºÎı¾ÐÍ£¬¿ÉÒÔÖ¸¶¨³¤¶È£¬·ñÔòĬÈÏֵΪ255£¡
3. BYTE£¬TINYINT£ºÊý×Ö-×Ö½Ú£¬²»ÒªÖ¸¶¨³¤¶ÈºÍ¾«¶È£¬·ñÔò»á±¨´í£¡
4. SMALLINT£¬SHORT£ºÊý×Ö-ÕûÐÍ£¬²»ÒªÖ¸¶¨³¤¶ÈºÍ¾«¶È£¬·ñÔò»á±¨´í£¡
5. INT£¬INTEGER£¬LONG£ºÊý×Ö-³¤ÕûÐÍ£¬²»ÒªÖ¸¶¨³¤¶ÈºÍ¾«¶È£¬·ñÔò»á±¨´í£¡
6.
NUMERIC£¬DECIMAL£ºÊý×Ö-СÊý£¬¿ÉÒÔÖ¸¶¨³¤¶ÈºÍ¾«¶È£¬ÈçÖ»Ö¸¶¨³¤¶È£¬ÄǾ«¶ÈĬÈÏΪ0£¬È綼²»Ö¸¶¨£¬ÄÇôĬÈϳ¤¶È18£¬Ä¬ÈϾ«¶È0£»
7. SINGLE£¬REAL£ºÊý×Ö-µ¥¾«¶ÈÐÍ£¬²»ÒªÖ¸¶¨³¤¶ÈºÍ¾«¶È£¬·ñÔò»á±¨´í£¡
8.
DOUBLE£¬FLOAT£¬NUMBER£ºÊý×Ö-Ë«¾«¶ÈÐÍ£¬²»ÒªÖ¸¶¨³¤¶ÈºÍ¾«¶È£¬·ñÔò»á±¨´í£¡
9. MEMO£º±¸×¢ÐÍ£¬²»ÒªÖ¸¶¨³¤¶È£¬·ñÔò»á±¨´í£¡
10. BINARY£º¶þ½øÖÆÐÍ£¬¿ÉÒÔÖ¸¶¨³¤¶È£¬·ñÔòĬÈϳ¤¶ÈΪ510£¡
11. BIT£ºÎ»ÐÍ£¬¿ÉÓøñʽ£¨yes/no, true/false, on/off£©
12. MONEY£¬CURRENCY£º»õ±ÒÐÍ£¬²»ÒªÖ¸¶¨³¤¶ÈºÍ¾«¶È£¬·ñÔò»á±¨´í£¡
13. DATETIME£ºÈÕÆÚʱ¼äÐÍ£¬²»ÒªÖ¸¶¨³¤¶È£¬·ñÔò»á±¨´í£¡
14. IMAGE£¬OLEOBJECT£º OLE OBJECTÐÍ£¬²»ÒªÖ¸¶¨³¤¶È£¬·ñÔò»á±¨´í£¡
ÍƼöʹÓõÄÊý¾ÝÀàÐÍÈçÏ£º
1. Îı¾ÀàÐÍÇëʹÓãºTEXT£¨³¤¶È£©»ò MEMO
2. ÊýÖµÀàÐÍ£¨ÕûÊý£©ÇëʹÓãºSHORT »ò LONG
3. ÊýÖµÀàÐÍ£¨Ð¡Êý£©ÇëʹÓãºDECIMAL£¨³¤¶È£¬¾«¶È£©
4. ÈÕÆÚÀàÐÍÇëʹÓãºDATETIME
²Î¿¼ÈçÏÂMICROSOFT¹Ù·½×ÊÁÏ£º
Êý¾ÝÀàÐÍ
´æ´¢´óС
˵Ã÷
BINARY
ÿ×Ö·ûÒ»¸ö×Ö½Ú ÈκÎÀàÐ͵ÄÊý¾Ý¶¼¿É´æ´¢ÔÚÕâÖÖÀàÐ͵Ä×Ö¶ÎÖС£
BIT &
Ïà¹ØÎĵµ£º
ËøµÄ¸ÅÊö ¡¡¡¡Ò». ΪʲôҪÒýÈëËø
¡¡¡¡¶à¸öÓû§Í¬Ê±¶ÔÊý¾Ý¿âµÄ²¢·¢²Ù×÷ʱ»á´øÀ´ÒÔÏÂÊý¾Ý²»Ò»ÖµÄÎÊÌ⣺
¡¡¡¡¶ªÊ§¸üÐÂ
¡¡¡¡A£¬BÁ½¸öÓû§¶ÁͬһÊý¾Ý²¢½øÐÐÐ޸ģ¬ÆäÖÐÒ»¸öÓû§µÄÐ޸Ľá¹ûÆÆ»µÁËÁíÒ»¸öÐ޸ĵĽá¹û£¬±ÈÈ綩Ʊϵͳ
¡¡¡¡Ôà¶Á
¡¡¡¡AÓû§ÐÞ¸ÄÁËÊý¾Ý£¬ËæºóBÓû§ÓÖ¶Á³ö¸ÃÊý¾Ý£¬µ«AÓû§ÒòΪijЩÔÒòÈ¡ÏûÁ˶ÔÊý¾ ......
½ñÌ칤×÷時ºò輸Èë數據庫ÖÐÓÐÒ»條數據×Ö¶Î記錄ÊÇ"¿Í戶·ñ¾ö"
ʹÓÃ
select * from TelephoneStatusCategory where CategoryName like '%¿Í戶·ñ%'
select * from TelephoneStatusCategory where CategoryName like '%¿Í戶·ñ¾ö% ......
ÀýÈç:
select getdate()
2004-09-12 11:06:08.177
Õâ¶ÔÓÚÔÚÒª²»Í¬Êý¾Ý¿â¼äתÒÆÊý¾Ý»òÕßÏ°¹ßoracleÈÕÆÚ¸ñʽYYYY-MM-DD HH24:MI:SSµÄÈ˶àÉÙÓÐЩ²»·½±ã.
ÎÒÕûÀíÁËÒ»ÏÂSQL ServerÀïÃæ¿ÉÄܾ³£»áÓõ½µÄÈÕÆÚ¸ñʽת»»·½·¨:
¾ÙÀýÈçÏÂ:
select CONVERT(varchar, getdate(), 120 )
2004-09-12 11:06:08
select replace(replac ......
ÔÚ½øÐÐÊý¾Ý¿â²éѯʱ£¬ÓÐÍêÕû²éѯºÍÄ£ºý²éѯ֮·Ö¡£
Ò»°ãÄ£ºý²éѯÓï¾äÈçÏ£º
SELECT ×ֶΠfrom ±í WHERE ij×ֶΠLike Ìõ¼þ
ÆäÖйØÓÚÌõ¼þ£¬SQLÌṩÁËËÄÖÖÆ¥Åäģʽ£º
1£¬%
£º±íʾÈÎÒâ0¸ö»ò¶à¸ö×Ö·û¡£¿ÉÆ¥ÅäÈÎÒâÀàÐͺͳ¤¶ÈµÄ×Ö·û£¬ÓÐЩÇé¿öÏÂÈôÊÇÖÐÎÄ£¬ÇëʹÓÃÁ½¸ö°Ù·ÖºÅ£¨%%£©±íʾ¡£
±ÈÈç SELECT * from [user] WHERE u_na ......
--Óû§Óë½ÇÉ«¹Øϵ
select a.uid as uid,a.status as uStatus,a.name as uName,
b.uid as rId,b.status as rStatus,b.name as rName
from sysusers a inner join sysusers b on a.gid = b.uid
where a.issqlrole = 0 and a.isapprole = 0 and a.hasdbaccess = 1 and (b.issqlrole = 1 or b.isapprole = 1)
......