摘要: 条件语句 流程控制-if else set serverout on; declare employee_number number; begin select count(*) into employee_count from employees where employee_age>30; if 阅读全文
posted @ 2018-02-05 16:29 NE_STOP 阅读(17) 评论(0) 推荐(0)
摘要: 利用聚合函数统计数据 求最大值-max() max()可应用数值型和字符型和日期型(实质也是数值型) select max(employee_age) max_age from employees max()应用字符型时,会按照字母表有前之后的顺序进行排序,如果含有英文名,则英文名永远排在中文名之前 阅读全文
posted @ 2018-02-05 15:35 NE_STOP 阅读(26) 评论(0) 推荐(0)
摘要: 日期处理 获取当前日期-sysdate() sysdate()获取的日期精确到秒 为日期加上特定月份-add_months() select add_months(to_date('2010-2-27','YYYY-MM-DD'),1) new_date from dual 结果:2010-3-27 阅读全文
posted @ 2018-02-04 10:57 NE_STOP 阅读(22) 评论(0) 推荐(0)
摘要: 数值型 理解精度 number类型的精度表示可以标识数据精确度的位数。对于数字13245.977,当精确到小数点后2位,数据为12345.98,此时精度为7。而当精确到小数点前2位,数据为12300,此时精度为3,因为有3个数字对数据的准确度作出贡献 精度与小数位数 number类型中。小数位数可正 阅读全文
posted @ 2018-02-03 18:00 NE_STOP 阅读(53) 评论(0) 推荐(0)
摘要: 字符型简介 固定长度字符串-char(n) n代表字符串的长度,当实际长度不足时,利用空格在右端补齐,n的最大值不能大于2000。所以只要是固定长度的字符串,他的length(值)的长度总为n varchar(n) 可变长度字符串,当实际长度不足时,不使用空格进行补充,同样长度也不许超出n。当作为列 阅读全文
posted @ 2018-02-03 16:08 NE_STOP 阅读(42) 评论(0) 推荐(0)
摘要: 插入数据-insert 单条插入 insert into 表名 (列1,列2...)values(值1,值2...) 批量插入 insert into c_student(student_id,student_name) select student_id,student_name from stu 阅读全文
posted @ 2018-02-03 15:08 NE_STOP 阅读(9) 评论(0) 推荐(0)
摘要: 查询 select employee_name from employees where 子句 select employee_name from employees where employee_age>25 根据2个数据表查询 select e.employee,s.salary from em 阅读全文
posted @ 2018-02-03 14:41 NE_STOP 阅读(21) 评论(0) 推荐(0)
摘要: 数据库迁移 对于数据库迁移来说,如果源数据库与目标数据库版本一致,推荐使用Oracle导入或者pl/sql导入;如果版本不一致,则可以使用sql导入的方式。 创建表空间 create tablespace test datafile 'E:\Database\data\test_data.dbf' 阅读全文
posted @ 2018-02-02 17:41 NE_STOP 阅读(10) 评论(0) 推荐(0)
摘要: treeList控件 1.去除树的头一行:属性–OptionsView–ShowColumns 设为fakse 2.去除树最左列的鼠标箭头列:属性–OptionsView–ShowIndicator设为false 阅读全文
posted @ 2017-12-27 17:49 NE_STOP 阅读(16) 评论(0) 推荐(0)
摘要: 1:在服务器上安装office的Excel软件. 2:在"开始"->"运行"中输入dcomcnfg.exe启动"组件服务" 3:依次双击"组件服务"->"计算机"->"我的电脑"->"DCOM配置" 4:在"DCOM配置"中找到"Microsoft Excel 应用程序",在它上面点击右键,然后点击 阅读全文
posted @ 2017-12-07 17:55 NE_STOP 阅读(27) 评论(0) 推荐(0)