delphi 中的update 语句对于不同的数据库是否一样

来源:百度知道 编辑:UC知道 时间:2024/09/26 00:25:25
各位高手:本人用的是sybase sql anywhere 数据库,编程是delphi,我的更新语句有问题吗?

Query1.Close;
Query1.Sql.Clear;
Sql_1:='update yhb set Mm="'+Trim(password)+'" where Mc="培训中心"';
Query1.Sql.Add(Sql_1);
Query1.ExecSql;

with Query1 do
begin
sql.Clear;
sql.Add('select * from yuanliaomingxi where mingchang="'+edit6.Text+'" and guige="'+edit5.Text+'"');
Query1.Open;

我一般是这么写

没有问题,基本的SQL语法所有的数据库都支持的。

是一样的

一样的