Create Table 'd:\abcd.db'(a string[20],
b BCD[20],
c Time,
d Numeric,
e Date,
f TimeStamp,
g Money,
h Memo[50],
i Bytes[10],
j Short,
k FMTMemo,
l AutoIncrement,
m Long,
n logical)
很多数据类型都不对,请哪位仁兄改一改。(主要是数据类型都不知道是什么关键字)
b BCD[20],
c Time,
d Numeric,
e Date,
f TimeStamp,
g Money,
h Memo[50],
i Bytes[10],
j Short,
k FMTMemo,
l AutoIncrement,
m Long,
n logical)
很多数据类型都不对,请哪位仁兄改一改。(主要是数据类型都不知道是什么关键字)
解决方案 »
- WebBrowser如何使用post方法提交给一个asp页面
- 紧急求救:(在线等)
- 如何在窗口中接管Tab键,用setwindowlong,接管窗口默认处理函数,但是都拿不到,有无别的办法
- 请教拉!动态配置ODBC(sql server)我知道,但不晓得怎么动态配置Password userId
- TreeView question
- [Fatal Error] Project1.dpr(1): File not found: 'System.pas'
- 一个菜鸟关于treeview的一些幼稚问题
- 请教各位高手,怎样在Delphi中用语句自动创建表?
- 我要控制在记事本中的输出格式,比如:
- 怎么将gif图形转换成bmp图?
- 奇怪的问题,请高手指点。
- 如何在delphi中获得“我的文档”的路径?在线等~
Constraints are limited to PRIMARY KEY for Paradox tables. Constraints are unsupported in dBASE tables.For example, the following statement creates a Paradox table with a PRIMARY KEY constraint on the LAST_NAME and FIRST_NAME columns:CREATE TABLE "employee.db"
(
LAST_NAME CHAR(20),
FIRST_NAME CHAR(15),
SALARY NUMERIC(10,2),
DEPT_NO SMALLINT,
PRIMARY KEY(LAST_NAME, FIRST_NAME)
)The same statement for a dBASE table should omit the PRIMARY KEY definition:CREATE TABLE "employee.dbf"
(
LAST_NAME CHAR(20),
FIRST_NAME CHAR(15),
SALARY NUMERIC(10,2),
DEPT_NO SMALLINT
)Creating Paradox and dBASE tablesYou create a Paradox or dBASE table using Local SQL by specifying the file extension when naming the table:".DB" for Paradox tables
".DBF" for dBASE tablesIf you omit the file extension for a local table name, the table created is the table type specified in the Default Driver setting in the System page of the BDE Configuration Utility.Data type mappings for CREATE TABLEThe following table lists SQL syntax for data types used with CREATE TABLE, and describes how those types are mapped to Paradox and dBASE types by the BDE:SQL Syntax BDE Logical Paradox dBASE
SMALLINT fldINT16 Short Number (6,10)
INTEGER fldINT32 Long Integer Number (20,4)
DECIMAL(x,y) fldBCD BCD N/A
NUMERIC(x,y) fldFLOAT Number Number (x,y)
FLOAT(x,y) fldFLOAT Number Float (x,y)
CHARACTER(n) fldZSTRING Alpha Character
VARCHAR(n) fldZSTRING Alpha Character
DATE fldDATE Date Date
BOOLEAN fldBOOL Logical Logical
BLOB(n,1) fldstMEMO Memo Memo
BLOB(n,2) fldstBINARY Binary Binary
BLOB(n,3) fldstFMTMEMO Formatted memo N/A
BLOB(n,4) fldstOLEOBJ OLE OLE
BLOB(n,5) fldstGRAPHIC Graphic N/A
TIME fldTIME Time N/A
TIMESTAMP fldTIMESTAMP Timestamp N/A
MONEY fldFLOAT, fldstMONEY Money Number (20,4)
AUTOINC fldINT32, fldstAUTOINC Autoincrement N/A
BYTES(n) fldBYTES(n) Bytes N/A
x = precision (default: specific to driver)
y = scale (default: 0)
n = length in bytes (default: 0)
1-5 = BLOB subtype (default: 1)