SQL Êý¾ÝÀàÐÍ
Microsoft Access Êý¾ÝÀàÐÍ
Êý¾ÝÀàÐÍ
ÃèÊö
´æ´¢
Text
ÓÃÓÚÎı¾»òÎı¾ÓëÊý×ÖµÄ×éºÏ¡£×î¶à 255 ¸ö×Ö·û¡£
Memo
Memo ÓÃÓÚ¸ü´óÊýÁ¿µÄÎı¾¡£×î¶à´æ´¢ 65,536 ¸ö×Ö·û¡£
×¢ÊÍ£ºÎÞ·¨¶Ô memo ×ֶνøÐÐÅÅÐò¡£²»¹ýËüÃÇÊÇ¿ÉËÑË÷µÄ¡£
Byte
ÔÊÐí 0 µ½ 255 µÄÊý×Ö¡£
1 ×Ö½Ú
Integer
ÔÊÐí½éÓÚ -32,768 µ½ 32,767 Ö®¼äµÄÊý×Ö¡£
2 ×Ö½Ú
Long
ÔÊÐí½éÓÚ -2,147,483,648 Óë 2,147,483,647 Ö®¼äµÄÈ«²¿Êý×Ö
4 ×Ö½Ú
Single
µ¥¾«¶È¸¡µã¡£´¦Àí´ó¶àÊýСÊý¡£
4 ×Ö½Ú
Double
Ë«¾«¶È¸¡µã¡£´¦Àí´ó¶àÊýСÊý¡£
8 ×Ö½Ú
Currency
ÓÃÓÚ»õ±Ò¡£Ö§³Ö 15 λµÄÔª£¬Íâ¼Ó 4 λСÊý¡£
Ìáʾ£ºÄú¿ÉÒÔÑ¡ÔñʹÓÃÄĸö¹ú¼ÒµÄ»õ±Ò¡£
8 ×Ö½Ú
AutoNumber
AutoNumber ×Ö¶Î×Ô¶¯ÎªÃ¿Ìõ¼Ç¼·ÖÅäÊý×Ö£¬Í¨³£´Ó 1 ¿ªÊ¼¡£
4 ×Ö½Ú
Date/Time
ÓÃÓÚÈÕÆÚºÍʱ¼ä
8 ×Ö½Ú
Yes/No
Âß¼×ֶΣ¬¿ÉÒÔÏÔʾΪ Yes/No¡¢True/False »ò On/Off¡£
ÔÚ´úÂëÖУ¬Ê¹Óó£Á¿ True ºÍ False £¨µÈ¼ÛÓÚ 1 ºÍ 0£©
×¢ÊÍ£ºYes/No ×Ö¶ÎÖв»ÔÊÐí Null Öµ
1 ±ÈÌØ
Ole Object
¿ÉÒԴ洢ͼƬ¡¢ÒôƵ¡¢ÊÓƵ»òÆäËû BLOBs (Binary Large OBjects)
×î¶à 1GB
Hyperlink
°üº¬Ö¸ÏòÆäËûÎļþµÄÁ´½Ó£¬°üÀ¨ÍøÒ³¡£
Lookup Wizard
ÔÊÐíÄã´´½¨Ò»¸ö¿É´ÓÏÂÁÐÁбíÖнøÐÐÑ¡ÔñµÄÑ¡ÏîÁÐ±í¡£
4 ×Ö½Ú
MySQL Êý¾ÝÀàÐÍ
ÔÚ MySQL ÖУ¬ÓÐÈýÖÖÖ÷ÒªµÄÀàÐÍ£ºÎı¾¡¢Êý×ÖºÍÈÕÆÚ/ʱ¼äÀàÐÍ¡£
Text ÀàÐÍ£º
Êý¾ÝÀàÐÍ
ÃèÊö
CHAR(size)
±£´æ¹Ì¶¨³¤¶ÈµÄ×Ö·û´®£¨¿É°üº¬×Öĸ¡¢Êý×ÖÒÔ¼°ÌØÊâ×Ö·û£©¡£ÔÚÀ¨ºÅÖÐÖ¸¶¨×Ö·û´®µÄ³¤¶È¡£×î¶à 255 ¸ö×Ö·û¡£
VARCHAR(size)
±£´æ¿É±ä³¤¶ÈµÄ×Ö·û´®£¨¿É°üº¬×Öĸ¡¢Êý×ÖÒÔ¼°ÌØÊâ×Ö·û£©¡£ÔÚÀ¨ºÅÖÐÖ¸¶¨×Ö·û´®µÄ×î´ó³¤¶È¡£×î¶à 255 ¸ö×Ö·û¡£
×¢ÊÍ£ºÈç¹ûÖµµÄ³¤¶È´óÓÚ 255£¬Ôò±»×ª»»Îª TEXT ÀàÐÍ¡£
TINYTEXT
´æ·Å×î´ó³¤¶ÈΪ 255 ¸ö×Ö·ûµÄ×Ö·û´®¡£
TEXT
´æ·Å×î´ó³¤¶ÈΪ 65,535 ¸ö×Ö·ûµÄ×Ö·û´®¡£
BLOB
ÓÃÓÚ BLOBs (Binary Large OBjects)¡£´æ·Å×î¶à 65,535 ×Ö½ÚµÄÊý¾Ý¡£
MEDIUMTEXT
´æ·Å×î´ó³¤¶ÈΪ 16,777,215 ¸ö×Ö·ûµÄ×Ö·û´®¡£
MEDIUMBLOB
ÓÃÓÚ BLOBs (Binary Large OBjects)¡£´æ·Å×î¶à 16,777,215 ×Ö½ÚµÄÊý¾Ý¡£
LONGTEXT
´æ·Å×î´ó³¤¶ÈΪ 4,294,967,295 ¸ö×Ö·ûµÄ×Ö·û´®¡£
LONGBLOB
ÓÃÓÚ BLOBs (Binary Large OBjects)¡£´æ·Å×î¶à 4,294,967,295 ×Ö½ÚµÄÊý¾Ý¡£
ENUM(x,y,z,etc.)
ÔÊÐíÄãÊäÈë¿ÉÄÜÖµµÄÁÐ±í¡£¿ÉÒÔÔÚ ENUM ÁбíÖÐÁгö×î´ó 65535 ¸öÖµ¡£Èç¹ûÁбíÖв»´æÔÚ²åÈëµÄÖµ£¬
Ïà¹ØÎĵµ£º
#include "iostream.h"
#include "stdio.h"
#import "C:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF")
int main(int argc, char* argv[])
{
::CoInitialize(NULL);
_ConnectionPtr m_pConnection;
m_pConnection.CreateInstance("ADODB.Connection");
tr ......
SQL°´ÕÕÈÕ¡¢ÖÜ¡¢Ô¡¢Äêͳ¼ÆÊý¾Ý ÊÕ²Ø
ÎÄÕ²ο¼£ºhttp://www.cnblogs.com/wenbhappy/archive/2008/07/02/1233660.html
Èç:
±í:consume_record
×Ö¶Î:consume (moneyÀàÐÍ)
date (datetimeÀàÐÍ)
ÇëÎÊÔõôдËÄÌõsqlÓï¾ä·Ö±ð°´ÈÕ,°´ÖÜ,°´ÔÂ,°´¼¾Í³¼ÆÏû·Ñ×ÜÁ¿.
Èç:1ÔÂ 1200Ô ......
¡¾1¡¿
create procedure proc_pager1
( @pageIndex int, -- ҪѡÔñµÚXÒ³µÄÊý¾Ý
@pageSize int -- ÿҳÏÔʾ¼Ç¼Êý
)
AS
BEGIN
declare @sqlStr varchar(500)
set @sqlStr='select top '+con ......
Standard Security:
"Data Source=Aron1;Initial
Catalog=pubs;User Id=sa;Password=asdasd;"
- or -
"Server=Aron1;Database=pubs;User
ID=sa;Pass ......
ÔÎĵØÖ·£ºhttp://www.eygle.com/case/Use.sql_trace.to.Diagnose.database.htm
SQL_TRACEÊÇOracleÌṩµÄÓÃÓÚ½øÐÐSQL¸ú×ÙµÄÊֶΣ¬ÊÇÇ¿ÓÐÁ¦µÄ¸¨ÖúÕï¶Ï¹¤¾ß.ÔÚÈÕ³£µÄÊý¾Ý¿âÎÊÌâÕï¶ÏºÍ½â¾öÖУ¬SQL_TRACEÊǷdz£³£Óõķ½·¨¡£
±¾ÎľÍSQL_TRACEµÄʹÓÃ×÷¼òµ¥Ì½ÌÖ£¬²¢Í¨¹ý¾ßÌå°¸Àý¶Ôsql_traceµÄʹÓýøÐÐ˵Ã÷.
Ò»¡¢ »ù´¡½éÉÜ
(a) ......