创建表、数据:
create table RoomInformation
(FloorNO int,
RoomNO int,
BadNO int);
create table HotelStaff
(ID int,
RoomNO int,
Name varchar(2),
Grade int,
Class int);
insert into RoomInformation values (1,101,4);
insert into RoomInformation values (1,102,4);
insert into RoomInformation values (1,103,4);
insert into HotelStaff values (1,101,'A1',2,1);
insert into HotelStaff values (2,101,'B1',2,2);
insert into HotelStaff values (3,101,'C1',1,1);
insert into HotelStaff values (4,101,'D1',1,2);
insert into HotelStaff values (5,102,'A2',2,1);
insert into HotelStaff values (6,102,'B2',2,2);
insert into HotelStaff values (7,102,'C2',1,1);
insert into HotelStaff values (8,102,'D2',1,2);
insert into HotelStaff values (9,103,'A3',2,1);
insert into HotelStaff values (10,103,'B3',1,2);
insert into HotelStaff values (11,103,'C3',2,2);
insert into HotelStaff values (12,103,'D3',1,1);
执行:
select b.id,a.RoomNO,b.Name,b.grade,b.class from RoomInformation a,HotelStaff b where a.RoomNO=b.RoomNO
结果:
Check if this entry is a directory or a file.
const size_t filenameLength = strlen(fileName);
if (fileName[filenameLength-1] == '/')
{
{