我有两个表,一个是桌面,另一个是桌面主要
桌面桌
create table Desktop (
ID int IDENTITY(1,1) PRIMARY KEY,
Company varchar(35),
Model_A varchar(50),
Model_B varchar(50),
Dealer varchar(35),
Invoice_Num varchar(50),
Purchase_Date varchar(15),
Warranty_Days int,
Warranty_Exp_Date varchar(15),
Warranty_Status varchar(20),
Machin_Type varchar(50),
System_Serial varchar(50),
Processor varchar(50),
Processor_Generation varchar(50),
Processor_speed varchar(30),
RAM varchar(30),
Hard_Disk varchar(30),
OS varchar(50),
OS_Bit varchar(15),
OS_Key varchar(40),
UserName varchar(50),
Location varchar(40),
System_IP varchar(30),
MS_Office_Ver varchar(50),
MS_Office_Key varchar(50),
Quick_Heal_IP varchar(50),
Quick_Heal_Key varchar(50),
Remarks varchar(100),
EntredBy varchar(30),
EntryDate varchar(15),
UpdatedBy varchar(30),
UpdatedDate varchar(15)
)
DeksktopMain表
create table DesktopMain (
Service_ID int IDENTITY(1,1) PRIMARY KEY,
ID int FOREIGN KEY REFERENCES Desktop (ID),
Request_Date varchar(15),
Call_loggedby varchar(20),
Service_No varchar(30),
Order_No varchar(30),
Days_Pending int,
End_Date varchar(15),
Working_Status varchar(3),
Service_Centre varchar(30),
Engineer_Name varchar(40),
Mobile_No varchar(25),
KeyBoard_Old_FRU varchar(20),
KeyBoard_Old_Sir varchar(20),
KeyBoard_New_FRU varchar(20),
KeyBoard_New_Sir varchar(20),
Mouse_Old_FRU varchar(20),
Mouse_Old_Sir varchar(20),
Mouse_New_FRU varchar(20),
Mouse_New_Sir varchar(20),
Problem_Detail varchar(400),
Part_Installed varchar(50),
Part_Serial varchar(50),
Report_Detail varchar(200)
)
我在Desktop Main中有Foreign key
ID。我想在桌面表格中显示1行,并与该桌面ID相关,该桌面ID与该1行下的桌面主要节目中的foreign key
匹配。像钻取下来