为什么不看看interbase的help?
下面是我摘的:
ALTER TABLE enables the structure of an existing table to be modified. A single ALTER TABLE can perform multiple adds and drops.
Naming column constraints is optional. If a name is not specified, InterBase assigns a system-generated name. Assigning a descriptive name can make a constraint easier to find for changing or dropping, and easier to find when its name appears in a constraint violation error message.
A table can be altered by its creator and the SYSDBA user.
ALTER TABLE fails if current data in a table violates a PRIMARY KEY or UNIQUE constraint definition added to the table. It also fails if a column to be dropped is:
Part of a UNIQUE, PRIMARY, or FOREIGN KEY constraint, or is used in a CHECK constraint.
Used in the value expression of a computed column.
Drop the constraint or computed column before dropping the table column. PRIMARY KEY and UNIQUE constraints cannot be dropped if referenced by FOREIGN KEY constraints. In these cases, drop the FOREIGN KEY constraint before dropping the PRIMARY KEY or UNIQUE key it references.
When altering a column based on a domain, an additional CHECK constraint can be supplied for the column. Changes to tables that contain CHECK constraints with subqueries may cause constraint violations.
To wlq:
昨天没上网。
除非在创建Table的时候创建索引,否则不会自动创建。当然也可以没有索引,但试图访问索引的时候就会出发异常,‘报错说我要设的索引不存在’...
我的戴妃5并没有你所说的‘delphi 5/DEMOS/Data ’目录。临时表放在哪里无所谓,其实我们什么时候关心过其物理存放位置?由于你使用了数据库,在发布你的应用程序时还的附带上BDE驱动,倒也用不着完全安装戴妃5,你说是吧?
至于‘delphi报错:'(a)'是valid use of keyword’,如果你有MSDN的光盘(肯定有,程序员的必备之物)的话,可以用关键字‘ALTER ’去查找关于 ALTER TABLE语法的完整说明。