select * from a,b where a.id=b.id

解决方案 »

  1.   

    用sql语句啊。
    连接有多种方式。
    最常用的就是内连接
    inner join 
    还有left join,right join...
    建议你看看sql语法。
    [ FROM {<table_source>} [,...n] ]<table_source> ::=
    table_name [ [AS] table_alias ] [ WITH ( <table_hint> [,...n]) ]
    | view_name [ [AS] table_alias ]
    | rowset_function [ [AS] table_alias ]
    | derived_table [AS] table_alias [ (column_alias [,...n] ) ]
    | <joined_table><joined_table> ::=
    <table_source> <join_type> <table_source> ON <search_condition>
    | <table_source> CROSS JOIN <table_source>
    | <joined_table><join_type> ::=
    [ INNER | { { LEFT | RIGHT | FULL } [OUTER] } ]
    [ <join_hint> ]
    JOIN
      

  2.   

    我想知道这句SQL语句用在哪?
    另外,如果我用代码连接主从表,在编写添加记录,删除记录等时是否会很麻烦?
      

  3.   

    使用主从表,我在编写添加记录,删除记录时直接给各个表挂上ttable,逐一操作,知道没有效率,但我确实不知道怎样才叫高手
      

  4.   

    谁能帮助我?用户名zongzy,急需!!!
      

  5.   

    通过连接啊!!commandtext:=select *from  a,b where a.id=b.id
      

  6.   

    用SQL语句连接主从表后,怎样把主从表放到两个DBGRID中?