随笔分类 - Oracle
摘要:1.开户功能 查询功能: 3.存款功能 4.取款功能 结果:
阅读全文
摘要:--命令窗口查询 exec 存储名、包名、视图; select 函数名 from dual; create or replace procedure PR_test is begin --存储过程的代码 Dbms_Output.put_line('这是输出的一句话'); --serveroutput 系统设置项 是否在命令窗口打开 默认是 off, --set serveroutput on...
阅读全文
摘要:--内置函数 --聚合函数 返回单个值 select count(*) from student where sclass='95031'; --count()记录条数 select sum(degree) from score t; --sum(degree)求成绩总和 select avg(degree) from score t; ...
阅读全文
摘要:--insert into添加数据 insert into student(sno,sname,ssex) values('110','王军','男'); --提交事物 commit; --回滚事物 --rollback; insert into teacher1 select * from teacher; insert into teacher1(ton,tname,prof) se...
阅读全文
摘要:--查询列 Select t.sname,t.ssex,t.class from student t --t 别名; Select *from student t; --* 代表查询表内所有数据 Select *from student t where t.sclass='95031'; --规定判断条件t.sclass='95031',用where连接 Select t.sn...
阅读全文
摘要:--删除 drop table dianfei; --创建表 create table dianfei ( uon varchar2(10) not null, mmonth varchar2(6) not null, ddf number(6,2) not null, djftime date not null, djfzt varchar2(3) not null, dsyjf date ...
阅读全文
摘要:19、 查询选修“3-105”课程的成绩高于“109”号同学成绩的所有同学的记录。 20、查询score中选学多门课程的同学中分数为非最高分成绩的记录。 21、查询成绩高于学号为“109”、课程号为“3-105”的成绩的所有记录。 22、查询和学号为108的同学同年出生的所有学生的Sno、Sname
阅读全文
摘要:create table admin ( aid varchar2(10) not null, apassword varchar2(8) not null, aphone varchar2(11) not null, aname varchar2(8) not null ); comment on table admin is '管理员登录'; comment on column admi...
阅读全文
摘要:9、 查询“95031”班的学生人数。 select count(1) from student where sclass='95031' 10、 查询Score表中的最高分的学生学号和课程号。(子查询或者排序) select s.sno,s.cno from score s where degre
阅读全文
摘要:1、 查询Student表中的所有记录的Sname、Ssex和Class列。 Select t.sname,t.ssex,t.sclass from student t; 2、 查询教师所有的单位即不重复的Depart列。 Select * from teacher t where t.depart
阅读全文
摘要:一、 设有一数据库,包括四个表:学生表(Student)、课程表(Course)、成绩表(Score)以及教师信息表(Teacher)。四个表的结构分别如表1-1的表(一)~表(四)所示,数据如表1-2的表(一)~表(四)所示。用SQL语句创建四个表并完成相关题目。 表1-1数据库的表结构 表(一)
阅读全文
摘要:全局唯一标识符(GUID,Globally Unique Identifier)是一种由算法生成的二进制长度为128位的数字标识符。GUID主要用于在拥有多个节点、多台计算机的网络或系统中。在理想情况下,任何计算机和计算机集群都不会生成两个相同的GUID。GUID 的总数达到了2^128(3.4×1
阅读全文

浙公网安备 33010602011771号