⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 查询.txt

📁 用sql2000建立的西安市公交系统
💻 TXT
字号:
/*队长视图*/
create view 查询队长
as
select 司机2.姓名,司机3.姓名 队长,司机3.线路号
from 司机 司机2,
	(select 司机1.姓名 姓名,司机1.线路号 线路号
	from 司机 司机1,队长
	where 司机1.工号=队长.工号
	) 司机3
where 司机2.线路号=司机3.线路号


/*司机信息*/
select 司机.工号,司机.姓名,司机.性别,司机.线路号 负责线路,本月出车次数,本月出车时间,查询队长.姓名 队长
from 司机,考勤,查询队长
where 司机.工号=考勤.工号 and 查询队长.线路号=司机.线路号

/*汽车*/
select 车牌,线路号,座位数
from 汽车

/*线路*/
select 线路.线路号,始发时间,末发时间,发车间隔,票价,查询队长.队长
from 线路,查询队长
where 线路.线路号=查询队长.线路号


/*倒车视图*/
create view 查询倒车
as
select 站点1.站点 站点,站点1.线路号 线路1,站点2.线路号 线路2
from 站点 站点1,站点 站点2
where 站点1.站点=站点2.站点

/*查询推荐*/
select 站点1.线路号
from 站点 站点1,站点 站点2
where 站点1.线路号=站点2.线路号 and 站点1.站点='小寨'and 站点2.站点='火车站'

/*倒车推荐*/
select 站点1.线路号,站点2.线路号,查询倒车.站点 倒车站点
from 站点 站点1,站点 站点2,查询倒车
where 查询倒车.线路1=站点1.线路号 and 查询倒车.线路2=站点2.线路号 and 
	站点1.站点='郭杜'and 站点2.站点='火车站' 
	and exists(select 站点1.线路号
		from 站点 站点1,站点 站点2
		where 站点1.线路号=站点2.线路号)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -