Query1.Close;
Query1.Sql.Clear;
Query1.Sql.Text:='create table yourtablename(id integer)';
Query1.ExecSql;
Query1.Sql.Clear;
Query1.Sql.Text:='create table yourtablename(id integer)';
Query1.ExecSql;
解决方案 »
- 隐藏窗体方法self.hide;怎么不能在FormCreate事件里使用?
- 如何判断多个FORM的SHOWMODAL关系
- 超级菜鸟问题,急切盼望高手回答
- sqlserver存取word文档慢的问题,高分
- 是个男人就进来,欢迎大家热烈讨论:我想就三层结构的中间层如何架构向大家请教一些问题?
- 登陆信息的存储问题!!!!!
- 求助:C的头文件转换为PAS,调用出错,高手请进!
- 如何逐条访问数据库中从表的每条记录?(当主表的当前记录变化后,从表用GRID显示)
- 四川省成都市宾江路113号怎么翻译啊
- 如何打包DAO?
- 如何用socket api写UDP协议通信的程序。。。
- 版主,您好!对贵站提了不少好建议,能否给加10000分!近来忙穷了!^_^
不用query 也可
开始菜单delphi-> help->bde->locate sql
对本地表的sql说的比较请促
Last_Name CHAR(20),
First_Name CHAR(15),
Salary NUMERIC(10,2),
Dept_No SMALLINT,
PRIMARY KEY (Last_Name, First_Name))An alternate syntax for creating a primary key constraint is using the CONSTRAINT keyword. While Paradox primary indexes do not have names, an arbitrary name needs to be provided to satisfy the CONSTRAINT keyword need for a token name.CREATE TABLE "employee.db"(
Last_Name CHAR(20),
First_Name CHAR(15),
Salary NUMERIC(10,2),
Dept_No SMALLINT,
CONSTRAINT z PRIMARY KEY (Last_Name, First_Name))Indicate whether the table is a Paradox or dBASE table 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 INIT page of the BDE Administrator utility. When specifying a file extension, the table name reference for CREATE TABLE must be enclosed in quotation s.Column definitions based on domains are not supported. Primary keys are the only form of constraint that can be defined with CREATE TABLE.Note To create a table with columns that have non-alphanumeric characters or spaces in the column name, you must enclose the column name in quotation s and prefix the quoted column name with the table name in quotes (if the filename extension is included) or just the table name. Any one of the three variations below are acceptable.CREATE TABLE "abc.db"(
ID CHAR(3),
"ABC.db"."Funny Name" CHAR(10))CREATE TABLE abc(
ID CHAR(3),
ABC."Funny Name" CHAR(10))CREATE TABLE "abc.db"(
ID CHAR(3),
ABC."Funny Name" CHAR(10))
with query1 do begin
sql.Clear;
sql.Add('create table "mytable1.db"(xuehao:integer,xingming:string)');
execsql;
end ;
首先表名可以不用加"",我从来就没加。
第二不用加 :号
第三应该没有string型吧?改为varchar(20)之类!
你是什么数据库?
create table TableStu (Index integer,Name varchar(20));
//我估计主要试你的类型出错。这些类型鱼你数据库有关!
qry.Sql.Add('create table "mytable1.db"(xuehao integer,xingming char(10))');
是正确的
(xuehao:integer,xingming:string)');
不合sql 规范 那是delphi 的语法
sql 是由数据库区执行的
如果你用bde
先用dababase 连接到你的数据库(source.mdb);
query1.batabasename=dababase 的batabasename
with query1 do
begin
close;
sql.Clear;
sql.Add('create table 表1(xuehao integer,xingming char(10))');
execsql;
end ;
如果用ado 也差不多关键看类型要access支持
qq 16211043