SELECT T1.ID,T1.NAME,NAME1 = NULL FROM TT1 T1 LEFT JOIN TT2 T2 ON T1.ID=T2.ID UNION ALLSELECT T1.ID,NAME = NULL,T2.NAME1 FROM TT1 T1 LEFT JOIN TT2 T2 ON T1.ID=T2.ID我测试过了,将你的对应的字段名改一下就行。mysql_query(create table `mytable` (`id` int not null auto_increment primary key ,`myname` varchar( 20 ) not null ,`beizhu` text not null));
当前标题:sql如何追加查询数据,SQL如何进行追加查询更新查询以及删除查询
网页网址:http://kswjz.com/article/ejsphp.html