摘要: 高级查询 1.连接查询(对列的扩展) 第一种形式select * from Info,Nation #会形成笛卡尔积 select * from Info,Nation where Info.Nation = Nation.Code #加入筛选条件 select Info.Code,Info.Nam 阅读全文
posted @ 2016-05-08 16:57 陌上初薰 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 1.普通查询 select * from info; #查询所有内容 select Code,Name from Info #查询某几列 2.条件查询 select * from Info where Code='p001' #条件查询 select * from Info where Nation 阅读全文
posted @ 2016-05-08 16:55 陌上初薰 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 1.创建表 create table Car ( Code varchar(50) primary key , Name varchar(50) not null, Time date, Price float, Brand varchar(50) references Brand(Code) ); create t... 阅读全文
posted @ 2016-05-08 16:53 陌上初薰 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 练习题目: 解题: 方法一: 1. 投票主页面: 2.处理投票页面: 3. 建立访问数据库的类,封装用于引用: 方法二: 1. 投票主页面: 2. 处理投票页面: 3. 查看投票结果页面: 网页显示结果: 阅读全文
posted @ 2016-05-08 15:21 陌上初薰 阅读(359) 评论(0) 推荐(0) 编辑