select m.*, p.specification, p.sales_price, p.promotion_price from product_detail p left join PRODUCT_IMAGE m on m.head_id = p.id and image_type = 1 and m.image_type = 1 and m.platform = 1 and m.type = 2 and m.orderby = 1 where p.serial_id = '42F4BE8…
在工作中需要完成这么一个需求:比较两个表的表结构是否形相同,并找出差异.比较两个表中的数据是否相同,并找出差异数据? 分析:由于表结构中字段比较多,手工比较很浪费时间,而且不能保证不出错误.对于表中的数据那就能多了,更不能靠这种方式比较. 为了思考问题简单和方便测试,首先先建立两个测试表,并插入一些测试数据吧,sql如下: create table t_A ( id VARCHAR2(36) not null, name VARCHAR2(100), age NUMBER, sex …