QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3304|回复: 0

sqlite3数据库(帮忙校对下,谢谢了)

[复制链接]
发表于 2005-5-7 19:04:49 | 显示全部楼层 |阅读模式
这只是修改表的那部分,刚刚翻译完没几天
ALTER TABLE//改变表
sql-statement ::= ALTER TABLE [database-name .] table-name 改变
改变 ::= RENAME TO new-table-name//重命名
改变 ::= ADD [COLUMN] column-def//添加字段

SQLite's version of the ALTER TABLE command allows the user to rename or add a new column to an existing table. It is not

possible to remove a column from a table.
sqlite允许使用者在现有的表中使用ALTER TABLE命令修改表名和添加新字段。它不能删除字段。

The RENAME TO syntax is used to rename the table identified by [database-name.]table-name to new-table-name. This command

cannot be used to move a table between attached databases, only to rename a table within the same database.
这个RENAME TO句法是修改能识别的[数据库.]原表名改成新表名。这个命令不能移动一个表到多个数据库,只能在同一个数据库中移动。

If the table being renamed has triggers or indices, then these remain attached to the table after it has been renamed.

However, if there are any view definitions, or statements executed by triggers that refer to the table being renamed, these

are not automatically modified to use the new table name. If this is required, the triggers or view definitions must be

dropped and recreated to use the new table name by hand.
如果这个表已存在触发器或目录,然后这些放在表后再命名。
无论如何,如果那是视图定义,或启动触发涉及到的那个重命名的表,这些新表名是删除和再造的。

The ADD [COLUMN] syntax is used to add a new column to an existing table. The new column is always appended to the end of the

list of existing columns. Column-def may take any of the forms permissable in a CREATE TABLE statement, with the following

restrictions:
这个ADD [COLUMN]句法是在现有的表中增加一个字段。这个新字段总是放在现有字段目录的后边。字段-定义可以是任何格式并且可以在一个

CREATE TABLE语句中,有下列限制:

    * The column may not have a PRIMARY KEY or UNIQUE constraint.
    * The column may not have a default value of CURRENT_TIME, CURRENT_DATE or CURRENT_TIMESTAMP.
    * If a NOT NULL constraint is specified, then the column must have a default value other than NULL.
    * 这个字段也许没有一个主键或唯一的限制。
    * 这个字段也许没有一个默认的当前时间,当前日期或当前时间戳的值。
    * 如果规定一个不允许有空值是一个约束,那么字段必须有一个不同于空值的默认值。

The execution time of the ALTER TABLE command is independent of the amount of data in the table. The ALTER TABLE command runs

as quickly on a table with 10 million rows as it does on a table with 1 row.
这个ALTER TABLE命令的执行时间是与表的数量无关。这个ALTER TABLE命令运行时,在一个表中的10万行的速度同表中的一行的一样的快。

After ADD COLUMN has been run on a database, that database will not be readable by SQLite version 3.1.3 and earlier until the

database is VACUUMed.
向一个数据库中连续添加字段,在SQLite version 3.1.3和较早的空数据库将不是易读的。
------------------------------------------------------
欢迎各位朋友校对,第3段和倒数1,2段语句不通顺的,请英语高手帮忙,谢谢。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-24 13:16 , Processed in 0.082157 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表