vec113 迅雷:selece *from table1,table2与select*from table1 union select*from table2的区别
来源:百度文库 编辑:中科新闻网 时间:2024/10/01 22:00:46
selece *from table1,table2与select*from table1 union select*from table2的区别
用select*from table1 union select*from table2能过实现两个表的查询但是用selece *from table1,table2时就出现
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC 驱动程序不支持所需的属性。
/haiger/serch.asp, 第 98 行
请各位大侠指点
用select*from table1 union select*from table2能过实现两个表的查询但是用selece *from table1,table2时就出现
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC 驱动程序不支持所需的属性。
/haiger/serch.asp, 第 98 行
请各位大侠指点
联合怎么会是一样呢???
table1中有 field1 field2 field3 (others)
table2中有 field1 field2 field3 (others)
select field1,field2,field3 from table1 union select field1,field2,field3
得到的表结构为:field1 field2 field3
select table1.*,talbe2.* from table1,talbe2
得到的表结构是 (field1,field2,field3,(others))table1,(field1,field2,field3,(others))talbe2
实在是懒得写全,如果懂的人应该知道,俺这里的*是他要的字段名,类型一样的字段名,不是sql是的*,嘎嘎!
selece *from table1,table2没有限制条件啊,没有相同项的时候怎么可以用*,后面+上"where table1.* 条件 table2.*"试试!
差别很大。
前者结果是两表的笛卡尔积,后者是两表的并集
union必需两个结果表结构相同,
最终结果没有重复
你语句错在table1.*,table2.*表结构不一样
selece *from table1,table2与select*from table1 union select*from table2的区别
select * from table1 where id in (select id from table2),
insert into table1(name,sex,id) from table2
SELECT @CNT=COUNT(*) FROM TABLE1 WHERE [NAME]= @ADDRNAME
select @id=id from [dbo].[table1] where id > -1 order by id ASC
sql server 2000 中如何知道 table1.column1 是否存在
From Shadowland
from poland
Outlook2003 from
delete from