社区
MS-SQL Server
帖子详情
现有两个数据表:A(stu_id,name),B(id,stu_id),求A表中的stu_id不在B中的stu_id.求此SQL语句
zhangqy
2003-10-15 04:20:54
现有两个数据表:A(stu_id,name),B(id,stu_id),求A表中的stu_id没在B中的出现的stu_id.求此SQL语句
...全文
288
6
打赏
收藏
现有两个数据表:A(stu_id,name),B(id,stu_id),求A表中的stu_id不在B中的stu_id.求此SQL语句
现有两个数据表:A(stu_id,name),B(id,stu_id),求A表中的stu_id没在B中的出现的stu_id.求此SQL语句
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
zhangqy
2003-10-15
打赏
举报
回复
谢谢!
workhand
2003-10-15
打赏
举报
回复
select stu_id from A where stu_id not in (select distinct stu_id from B)
pengdali
2003-10-15
打赏
举报
回复
打个补丁:
select * form A where stu_id not in (select stu_id from B where stu_id is not null)
gmlxf
2003-10-15
打赏
举报
回复
select stu_id from A where stu_id not in (select stu_id from B)
pengdali
2003-10-15
打赏
举报
回复
select * form A where stu_id not in (select stu_id from B)
longji
2003-10-15
打赏
举报
回复
select stu_id from A where a.stu_id not in (select stu_id from B)
MySQL在多表上创建视图
MySQL
中
,在
两个
或者以上的基本表上创建视图在
stu
dent表和
stu
_info表上,创建
stu
_class视图,查询出s_
id
号、姓名和班级 首先,创建
stu
_info表,并向
表
中
插入数据查看
表
中
的数据创建
stu
_class视图查看视图可以看出,创建的视图包含
id
、name和class字段 其
中
,
id
字段对应
stu
dent
表
中
的s_
id
字段,name字段对应
stu
dent
表
中
的name字段,
错误代码: 1052 Column '
stu
_
id
' in field list is ambiguous
1、错误描述 1 queries executed, 0 success, 1 errors, 0 warnings 查询:select
stu
_
id
, (SELECT
stu
_name FROM t_
stu
dent_info t WHERE t_
stu
dent_info.
stu
_
id
= t.
stu
_
id
)
stu
_name from t_
stu
dent_info t, t_... 错误代
数据库原理与应用 实验三:表数据操作
sql语句
数据库原理与应用 实验报告 实验三:表数据操作 1.使用数据库
stu
dent use
stu
dent; go 2.向 学生信息表
stu
_info 添加信息 --学生信息表 INSERT INTO
stu
_info(
stu
_
id
,name,sex,birthday,address,mark,major,sdept) VALUES('2007070101','张元','男','1985-10-09','河南郑州',580,'计算机科学与技术','信息学院') INSERT INTO
stu
_info(
stu
_
C++之智能指针std::shared_ptr简单使用和理解
1 智能指针std::shared_ptr相关知识和如何使用 我们这里先说下智能指针std::shared_ptr,因为我看到我我们项目c++代码里面用得很多,我不是不会,所以记录学习下 先让ubuntu终端支持c++11,如果自己的电脑还没配置号,可以先看下我的这篇博客linux之让终端支持C++11/14编译cpp文件 1) 所在的头文件 #include <memo...
出现Field '
stu
_
id
' doesn't have a default value的解决办法
我的项目是SSH2,最近在插入数据到数据库的时候出现错误:Field '
stu
_
id
' doesn't have a default value at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) at org.h
MS-SQL Server
34,590
社区成员
254,589
社区内容
发帖
与我相关
我的任务
MS-SQL Server
MS-SQL Server相关内容讨论专区
复制链接
扫一扫
分享
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章