标题:求解。。多表联查
取消只看楼主
跳过去
Rank: 8Rank: 8
等 级:贵宾
威 望:20
帖 子:282
专家分:976
注 册:2012-8-13
结帖率:91.3%
 问题点数:0 回复次数:2 
求解。。多表联查
1、简历表
create table tb_ResumeTxt
(
    ResumeID int primary key identity(1,1),
     UserID int not null,            --外键UserID
)
2、招聘表
create table tb_RecruiTxt
(
    RecruiTxtID int primary key identity(1,1),
    ZhaopinTitle varchar(200) not null,
    UserID  int not null

3、投递简历/公司向用户发送邀请
create table tb_UserDeliver
(
    DeliverID int primary key identity(1,1),
    RecruiTxtID int not null,--外键(recruiTxtID) 招聘简历信息ID
    ResumeID int not null ,  --外键(resumeID)  求职者简历ID
    Isyaoqiu int default(0) check(Isyaoqiu=0 or Isyaoqiu=1),  --企业是否邀请
    DeliverTime datetime default(getdate()) --系统当前时间
)

根据 用户 简历ID来 查看 我投过 哪家公司,
根据 招聘ID 来查看我邀请过哪些用户
这种SQL语句怎么写啊?急求啊。。。。会的帮帮忙

搜索更多相关主题的帖子: 招聘简历 identity primary create 
2013-03-18 17:31
跳过去
Rank: 8Rank: 8
等 级:贵宾
威 望:20
帖 子:282
专家分:976
注 册:2012-8-13
得分:0 
没人会吗

光棍中.....
2013-03-18 21:10
跳过去
Rank: 8Rank: 8
等 级:贵宾
威 望:20
帖 子:282
专家分:976
注 册:2012-8-13
得分:0 
我参与过的帖子
create proc proc_post_UserISPost
@userID int
as
select Post.PostID,Post.PostTypeID,Post.PostTitle,Post.PostTime from  ((select distinct PostComment.PostID
from PostComment JOIN
     CommentReply on PostComment.UserID=@userID or CommentReply.UserID =@userID
where PostComment.UserID=@userID  or
      CommentReply.UserID=@userID) as t1
left join Post on t1.PostID = Post.PostID)
go

光棍中.....
2013-07-05 16:31



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-401200-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.149369 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved