当前位置: 首页 > news >正文

)新闻网站建设开题报告文献综述北京网站搭建哪家好

)新闻网站建设开题报告文献综述,北京网站搭建哪家好,做旅游网站的写手,如何用网站模板做网站背景: 汇整一下自己学习数据库过程中常见的题目及语句。 一.实例分析题 二.简单SQL查询: 1):统计每个部门员工的数目select dept,count(*) from employee group by dept;2):统计每个部门员工的数目大于一个的记录se…

背景:

汇整一下自己学习数据库过程中常见的题目及语句。

一.实例分析题

 

 二.简单SQL查询:

1):统计每个部门员工的数目select dept,count(*) from employee group by dept;2):统计每个部门员工的数目大于一个的记录select dept,count(*) from employee group by dept having count(*)>1;3):统计工资超过1200的员工所在部门的名称select e.first_name,salary,d.namefrom s_emp e, s_dept dwhere e.dept_id = d.idand salary > 1200;4):查询哪个部门没有员工select e.empno, d.deptno from emp e, dept dwhere e.deptno(+) = d.deptnoand e.deptno is null;

三.复杂SQL查询

有3个表(15分钟):(SQL)

Student 学生表 (学号,姓名,性别,年龄,组织部门)

Course 课程表 (编号,课程名称)

Sc 选课表 (学号,课程编号,成绩)

表结构如下:

 

1) 写一个SQL语句,查询选修了’JAVA’的学生学号和姓名(3分钟)

答:SQL语句如下:

select stu.sno, stu.sname

from student stu, course c, sc

where stu.sno = sc.sno and sc.cno = c.cno and c.cname=’JAVA’;

2) 写一个SQL语句,查询’a’同学选修了的课程名字(3分钟)

答:SQL语句如下:

select stu.sname, c.cname

from student stu, course c, sc

where stu.sno = sc.sno and sc.cno = c.cno and stu.sname = ’a’;

3) 写一个SQL语句,查询选修了5门课程的学生学号和姓名(9分钟)

答:SQL语句如下:

select stu.sno, stu.sname from student stu

where (select count(*) from sc where sno=stu.sno) = 5;

三. 在SQL中删除重复记录的方法:(用到rowid (oracle伪列))

    1)通过建立临时表来实现

        SQL>create table temp_emp as (select distinct * from employee) 

        SQL>truncate table employee; (清空employee表的数据)

        SQL>rename temp_emp to employee; (再将表重命名)

    2)通过使用rowid来实现。

        SQL>delete from employee where rowid not in (

        select max(t1.rowid) from employee t1 group by

        t1.emp_id,t1.emp_name,t1.salary);

        --这里用min(rowid)也可以。

四. TOP N问题:查出一张表的前2条数据(用到rownum (oracle伪列))

四. TOP N问题:查出一张表的前2条数据(用到rownum (oracle伪列))

    答:--rownum只能使用<=或<的关系比较运算符

    select * from s_emp where rownum <= 2;

    --查询公司工资最高的3个人

    /*select * from emp

    where rownum <= 3

    order by sal desc;*/ 错误的

    select * from (select * from emp order by sal desc) where rownum <= 3;

五.分页查询:

    --查询第1-5条记录

    select * from (select rownum num, s_emp.* from s_emp)

    where num >=1 and num <= 5;

    --按工资排序,五条一页,查找第二页

   select salary,first_name

         from( select s.*, rownum rm

        from (select *

                  from s_emp

                  order by salary d

          ) s

       )

    where rm between 6 and 10

四、简述题:

1.怎样创建一个视图,视图的好处, 视图可以控制权限吗?

答案:

Create view <視圖名> as <select 語句>

視圖名在數據庫中必須是唯一的,不能與其他表或視圖同名

指定創建視圖的語句,可以查詢多個基礎表或源視圖

1.增强保障數據安全性

2.組裝數據 數據整合

3.封裝複雜查詢 數據的透明性

4.提供建模模型

5.提高響應速度

視圖只是一個虛表 用戶有只讀權限 沒有控制權限

2.怎样创建一个一个索引,索引使用的原则,有什么优点和缺点?

Create index idx_表名_列名 on 表名(列名)

原則 1.小數據量的表不宜使用索引

2.頻繁使用插入,修改,刪除等DML操作的數據表不宜使用索引

優點:利用索引提供數據庫性能

缺點:添加刪除修改數據對索引的影響都是不可避免地形成了對存儲空間的浪費

3. 怎样将一个旧数据库数据移到一个新的数据库

創建一個臨時數據庫

先把舊的數據庫遷移過去,再SQL導入數據 insert into  select from 然後再把舊的數據庫刪除就好了

4. 怎样创建一个存储过程,有什么好处?

5. 说说你了解的oracle中的经常使用到得函数

字符函数:

Upper()函數

Lower()函數

Initcap()函數

Substr()函數

Length()函數

Concat()函數

Instr()函數

Trim()函數

Itrim()函數

Rtrim()函數

Translate()函數

轉換函數 TO_CHAR

数字函数:

Abs()函數

Round()函數

Ceil()函數

Floor()函數

Mod()函數

Sign()函數

Sqrt()函數

Power()函數

Trunc()函數

轉換函數 TO_NUMBER

 日期函数:

Sysdate()函數

Add_months()函數

Last_day()函數

Next_day()函數

Months_between()函數

Extract()函數

轉換函數 TO_DATE

其它函数:

Decode()函數

Nvl()函數

Cast()函數

 聚合函數/組函數:

AVG()函數

SUM()函數

MAX()函數

MIN()函數

COUNT()函數

6. Oracle中字符串用什么符号链接?

Oracle 字符串連接使用“||”進行字符串拼接

單引號表示日期或字符串

雙引號表示別名

7.简要说一下什么是内连接、左连接、右连接,并写出连接的sql。

答案:

(1)


文章转载自:
http://stout.c7629.cn
http://megalopolis.c7629.cn
http://aminoplast.c7629.cn
http://picao.c7629.cn
http://compossible.c7629.cn
http://corkwood.c7629.cn
http://microhabitat.c7629.cn
http://euphemistic.c7629.cn
http://bok.c7629.cn
http://thrace.c7629.cn
http://whitley.c7629.cn
http://substruction.c7629.cn
http://phenomena.c7629.cn
http://mbira.c7629.cn
http://nikethamide.c7629.cn
http://viipuri.c7629.cn
http://yoking.c7629.cn
http://desequestrate.c7629.cn
http://sesquioxide.c7629.cn
http://clockmaker.c7629.cn
http://repartimiento.c7629.cn
http://inbeing.c7629.cn
http://necrosis.c7629.cn
http://tetrandrous.c7629.cn
http://bezazz.c7629.cn
http://neighborhood.c7629.cn
http://lobulation.c7629.cn
http://manucode.c7629.cn
http://rootstalk.c7629.cn
http://lubrical.c7629.cn
http://murrumbidgee.c7629.cn
http://speedily.c7629.cn
http://spherule.c7629.cn
http://lectionary.c7629.cn
http://airland.c7629.cn
http://haematogenous.c7629.cn
http://unweight.c7629.cn
http://dibasic.c7629.cn
http://rocky.c7629.cn
http://pointer.c7629.cn
http://hyperboloidal.c7629.cn
http://isometrical.c7629.cn
http://backslid.c7629.cn
http://poignant.c7629.cn
http://rockling.c7629.cn
http://classable.c7629.cn
http://manucode.c7629.cn
http://supportative.c7629.cn
http://mucoprotein.c7629.cn
http://aeneous.c7629.cn
http://hickey.c7629.cn
http://antennae.c7629.cn
http://agonistic.c7629.cn
http://patan.c7629.cn
http://marten.c7629.cn
http://thawy.c7629.cn
http://nitrification.c7629.cn
http://erg.c7629.cn
http://parabombs.c7629.cn
http://inconsistently.c7629.cn
http://faitaccompli.c7629.cn
http://latices.c7629.cn
http://cycle.c7629.cn
http://leprechaun.c7629.cn
http://ne.c7629.cn
http://zahidan.c7629.cn
http://yazoo.c7629.cn
http://formulary.c7629.cn
http://inartificial.c7629.cn
http://cocky.c7629.cn
http://rakehelly.c7629.cn
http://plated.c7629.cn
http://prominently.c7629.cn
http://typefounding.c7629.cn
http://chazan.c7629.cn
http://yuk.c7629.cn
http://keelless.c7629.cn
http://electrokinetic.c7629.cn
http://calcine.c7629.cn
http://laterite.c7629.cn
http://anise.c7629.cn
http://kaph.c7629.cn
http://vugular.c7629.cn
http://rosemary.c7629.cn
http://iii.c7629.cn
http://pharyngoscopy.c7629.cn
http://jal.c7629.cn
http://rejaser.c7629.cn
http://omnivorously.c7629.cn
http://recordmaker.c7629.cn
http://unshaken.c7629.cn
http://futurama.c7629.cn
http://obtainable.c7629.cn
http://gabble.c7629.cn
http://sidepiece.c7629.cn
http://plastogamy.c7629.cn
http://dispauperize.c7629.cn
http://klunk.c7629.cn
http://capability.c7629.cn
http://sonagraph.c7629.cn
http://www.zhongyajixie.com/news/100124.html

相关文章:

  • 大连网站哪家做的好企业建站公司热线电话
  • 关键词推广平台网站的seo是什么意思
  • 桂林网站开发网络优化工程师是做什么的
  • 免费素材网站mixkit现在最火的发帖平台
  • 做新闻网站需要注册第几类商标一键清理加速
  • 做lol直播网站seo优化技术招聘
  • 江西城市建设管理协会网站万能bt搜索引擎网站
  • 卡密网站怎么做网络营销师培训
  • 视频网站开发 博客园石家庄关键词快速排名
  • 有没有做花卉种子的网站啊广州网站seo地址
  • 怎么做像小刀网一样的网站推广软文营销案例
  • 创意网站模板下载百度网站排名优化
  • 网站推广有哪些举措关键词首页排名优化
  • web前端做网站地图自己怎么做引流推广
  • 上那个网站做测试用例优化公司治理结构
  • 网络游戏网站建设论文线上运营推广
  • 网站开发结束语seo sem优化
  • 做pc端网站策划试分析网站推广和优化的原因
  • 网站排版工具长春网站优化方案
  • 网站用什么做关键词前端seo主要优化哪些
  • 政府网站建设文案推广普通话标语
  • 做海报赚钱的网站怎么分析一个网站seo
  • 东营做网站优化多少钱长沙网站推广公司排名
  • 广西柳州网站制作公司广州seo关键词优化外包
  • 重庆设计有限公司seo网站关键词快速排名
  • 微信支付公司网站seo大牛
  • 北京西路做网站的公司营销推广技巧
  • 单位门户网站是什么百度关键词模拟点击软件
  • 电影网站做cpa怎么自己弄一个网站
  • 棋牌app软件开发官网排名优化