首页 > 试题广场 >

Mysql(版本8.0.25)中表student_table

[单选题]
Mysql(版本8.0.25)中表student_table(id,name,birth,sex),插入如下记录:
('1004' , '张三' , '2000-08-06' , '男');
('1005' , NULL , '2001-12-01' , '女');
('1006' , '张三' , '2000-08-06' , '女');
('1007' , ‘王五’ , '2001-12-01' , '男');
('1008' , '李四' , NULL, '女');
('1009' , '李四' , NULL, '男');
('1010' , '李四' , '2001-12-01', '女');
执行
select t1.*,t2.*
from (
select * from student_table where sex = '男' ) t1 
full  join 
(select * from student_table where sex = '女') t2 
on t1.birth = t2.birth and t1.name = t2.name ; 
的结果行数是()?
  • 4
  • 3
  • 2
  • 执行报错
mysql是不支持full join的
发表于 2021-12-22 12:56:15 回复(3)
不会是王五的那个单引号吧?

发表于 2021-12-21 19:19:07 回复(5)
oracle里面有full join,但是在mysql中没有full join。我们可以使用union来达到目的
发表于 2021-12-31 11:15:13 回复(0)
Oracle数据库支持full join,mysql是不支持full join的,但仍然可以同过左外连接+ union+右外连接实现
发表于 2022-04-11 16:23:19 回复(0)
所以说排除mysql不支持 答案是5吗
发表于 2022-01-24 19:36:41 回复(3)
oracle数据库支持full join,mysql是不支持full join的,但仍然可以同过左外连接+ union+右外连接实现。
发表于 2023-04-11 09:29:08 回复(0)
select t1.* ,t2.* from (
select * from student_table where sex = '男' ) t1 
full join 
(select * from student_table where sex = '女') t2 
on t1.birth = t2.birth and t1.name = t2.name
> 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'full join 
(select * from student_table where sex = '女') t2 
on t1.birth = t' at line 3
> 时间: 0s

发表于 2022-05-09 12:08:31 回复(1)
我真的是奔溃了
编辑于 2024-03-08 04:21:32 回复(0)
mysql。不支持full join
编辑于 2024-03-07 03:28:41 回复(0)
好家伙,mysql不支持full join 
编辑于 2023-12-19 15:26:22 回复(0)
mysql没有full join
发表于 2022-05-18 09:51:11 回复(0)