我是菜鸟啊:
请问SQL怎么写?
已知表people
字段name age address现在要在表的结尾处插入新的一条记录?怎么写呢
请高人指点!
谢谢

解决方案 »

  1.   

    insert into people(name,age,address) values('......','......','......')
      

  2.   

    insert into people(name,age,address) values('......','......','......')
    楼上的这样不行啊
    我的是excel数据库,这样只会插入到当前表的记录处的下一条记录
    并不会插入到结尾处的
      

  3.   

    不能确定数据会插入在什么地方的。
    想要数据显示在dbgrid尾部,可以用排序
      

  4.   

    我一定要插入尾部哦
    然后在dbgrid中显示出来而不用排序
    因为显示的就是数据库里面表的顺序,但是插入到中间了不能实现吗
      

  5.   

    Query2.Close;
        Query2.SQL.Clear;
        Query2.SQL.Add('insert into people values('''+
        edit1.Text+''','''+
        edit2.Text+''','''+
        edit3.Text+''')');
        Query2.ExecSQL;        Table1.Close;
            table1.Open;
            table1.Last;//希望在dbgrid中显示出来并聚焦最后一条记录所以才希望上面可以插入到结尾处.但是实际上没有插入到最后.
    望高人指点.
      

  6.   

    要插入到表的尾部,可以使用table控件,用append就可以了。
      

  7.   

    把表记录指针移动到最后,然后插入记录
    Query.MoveLast,
    Query.Insert
      

  8.   

    query.clear;
    query.sql.add(insert into people(name,age,address)
     values('......','......','......'))
     Query.ExecSQL;
      

  9.   

    query.last;
    query.sql.add(insert into people(name,age,address)
     values('......','......','......'))
     Query.ExecSQL;
      

  10.   

    query.last;
    query.clear;
    query.sql.add(insert into people(name,age,address)
     values('......','......','......'))
     Query.ExecSQL;
      

  11.   

    query1.last;
    query.clear;
    query.sql.add(insert into people(name,age,address)
     values('......','......','......'))
     Query.ExecSQL;
    用两个不同的,一个用来显示,一个用来插入
      

  12.   

    只有采用排序才可能达到呢?数据库的物理存放你是控制不住的,除非是.dbf或.db数据库