摘要: using System; using System.Collections.Generic; using System.Text; namespace 方法重载 { class area { public static double AREA(double r) { double pi = 3.1 阅读全文
posted @ 2024-04-09 22:57 困到很想醒 阅读(11) 评论(0) 推荐(0) 编辑
摘要: string ConnectionString = "Data Source=127.0.0.1/orcl;user id=scott;password=tiger;"; OracleConnection conn = new OracleConnection(ConnectionString); 阅读全文
posted @ 2024-04-09 22:50 困到很想醒 阅读(27) 评论(0) 推荐(0) 编辑
摘要: --创建表 create table disney( id number primary key, data varchar2(10)); --创建序列 create sequence id_seq; --创建触发器 create or replace trigger bifer_disney_id 阅读全文
posted @ 2024-04-09 22:48 困到很想醒 阅读(9) 评论(0) 推荐(0) 编辑
摘要: package text.coming; import java.sql.*; public class demo { public static void main(String[] args) { Connection ct=null; Statement statement=null; try 阅读全文
posted @ 2024-04-09 22:46 困到很想醒 阅读(9) 评论(0) 推荐(0) 编辑
摘要: --用Scott用户 conn scott/tiger --根据输入的员工编号统计该部门的员工人数 --oracle的存储过程 --创建或者修改存储过名字可以汉字,定义变量,exception异常处理no_date_found查无数据 create or replace procedure pro_ 阅读全文
posted @ 2024-04-09 22:44 困到很想醒 阅读(8) 评论(0) 推荐(0) 编辑
摘要: for循环 FOR ... in ... LOOP END LOOP; BEGIN FOR i IN 1..10 LOOP dbms_output.put_line(i); END LOOP; END; 问题 1 到 50 ? 3到40 ? while循环 WHILE ... LOOP END LO 阅读全文
posted @ 2024-04-09 22:43 困到很想醒 阅读(7) 评论(0) 推荐(0) 编辑
摘要: --问题输出 下面的内容:oracle世界我来了,一刀999 --declare用于定义变量dbms_output.put_line()是输出语句, --DECLARE --BEGIN --END DECLARE msg varchar2(20) := 'Hello'; BEGIN dbms_out 阅读全文
posted @ 2024-04-09 22:42 困到很想醒 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 一 语句查询 1, 在SCOTT模式下,检索emp表的指定列(empno,ename,job) 2, 检索emp表的sal列,把其值调整为原来的1.5 3, 在emp表中,使用like关键字匹配以字母s开头的员工名称 4, 查询emp表中没有奖金的员工信息 5, 在emp表中,查询既不是最高工资,也 阅读全文
posted @ 2024-04-09 22:38 困到很想醒 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 老王是食堂的采购员,每天买白菜50斤,土豆30斤,茄子30斤,豆角50斤,采购完都会记录到下面的Vegetable 表中,请你用学到的Oracle知识帮帮老王算算帐。 编号 白菜单价 土豆单价 茄子单价 豆角单价 日期 001 0.35 0.5 0.5 1.2 2017/11/10 002 0.4 阅读全文
posted @ 2024-04-09 22:34 困到很想醒 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 授权 120 Gaoshu 2 32 2 111 English 2 30 3 520 Tiyu 2 32 3 112 HTML 2 32 3 1 查询 高数的学分是多少? select * from kechengbiao; select XS from kechengbiao where KCM 阅读全文
posted @ 2024-04-09 22:22 困到很想醒 阅读(4) 评论(0) 推荐(0) 编辑
摘要: win +R 键 sqlplus 1 用户名:scott 密码 :tiger select * from emp; select * from dept; select ename,sal,comm from emp; select ename,sal+nvl(comm,0) from emp; s 阅读全文
posted @ 2024-04-09 22:13 困到很想醒 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 用户名 : scott 密码 : tiger 三种方法可以打开sqlplus 1 win+R 打开窗口 输入 sqlplus 2 快捷方式 3 在oracle 主菜单下打开 select * from emp; select * from dept; select 1+1 from dual; se 阅读全文
posted @ 2024-04-09 22:10 困到很想醒 阅读(3) 评论(0) 推荐(0) 编辑
摘要: --1 切换到master数据库中 use master go --2 判断cpms数据库是否存在,若存在则删除 if exists(select * from sys.sysdatabases where name='cpms') drop database cpms go --3 创建cpms数 阅读全文
posted @ 2024-04-09 22:04 困到很想醒 阅读(21) 评论(0) 推荐(0) 编辑
摘要: --1.切换到master数据库 use master go --2.检查删除数据库 if exists(select * from sys.sysdatabases where name='student') drop database student go --3.按照四个步骤创建student 阅读全文
posted @ 2024-04-09 22:02 困到很想醒 阅读(9) 评论(0) 推荐(0) 编辑
摘要: --1 切换到master数据库中 use master go --2 判断cpms数据库是否存在,若存在则删除,begin和end可以相当于c#中的大括号{} if exists(select * from sys.sysdatabases where name='cpms')-- 存在ture不 阅读全文
posted @ 2024-04-09 22:01 困到很想醒 阅读(2) 评论(0) 推荐(0) 编辑
摘要: --切换到master数据库 use master go --删除cpms数据库 drop database cpms go --创建cpms数据库 create database cpms on(name=cpms_data1,filename='c:\cpms\cpms_data1.mdf') 阅读全文
posted @ 2024-04-09 22:00 困到很想醒 阅读(11) 评论(0) 推荐(0) 编辑
摘要: --切换到master数据库 use master go --创建cpms数据库 --①主数据文件名为CPMS_data1.mdf,文件大小为20MB,最大文件大小为100MB,文件增量为10MB; --②事务日志文件名为CPMS_log.ldf,文件大小为20MB,最大文件大小为50MB,文件增量 阅读全文
posted @ 2024-04-09 21:59 困到很想醒 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 现场训练 --1.1 切换至master数据库中; use master go --1.2 删除已创建的Cpms数据库; drop database cpms go --1.3、创建“CPMS”数据库。该数据库保存路径:c:\CPMS文件夹。其中: --①主数据文件名为CPMS_data1.mdf, 阅读全文
posted @ 2024-04-09 21:39 困到很想醒 阅读(9) 评论(0) 推荐(0) 编辑
摘要: --创建电脑销售管理系统数据库 --切换到master数据库 use master --切换数据库 go --删除数据库 --drop database --go --3-1 创建“CPMS”数据库。该数据库包括2个文件,保存路径:D:\CPMS文件夹。其中: --①主数据文件名为CPMS_data 阅读全文
posted @ 2024-04-09 21:38 困到很想醒 阅读(16) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace EventHa 阅读全文
posted @ 2024-04-09 21:28 困到很想醒 阅读(7) 评论(0) 推荐(0) 编辑