ITeye博客

sql + oracle

共 2 篇文章

Oracle 创建数据库步骤

【Oracle 创建数据库的步骤】 1.首先,创建(新)用户: create user username identified by password; username:新用户名的用户名 password: 新用户的密码 也可以不创建新用户,而仍然用以前的用户,如:继续利用scott用户 2.创建表空间: create tablespace tablespacename datafile 'd:\data.dbf' size xxxm; tablespacename:表空间的名字 d:\data.dbf':表空间的存储位置 xxx表空间的大小,m单位为兆(M) 3.将空间分配给用户: al…

2015-02-04 10:58 · sql + oracle · SQL Server · Oracle

oracle || 和(+) + substr 函数 用法总结

【substr函数用法】 substr(字符串,截取开始位置,截取长度) //返回截取的字 substr('Hello World',0,1) //返回结果为 'H' *从字符串第一个字符开始截取长度为1的字符串 substr('Hello World',1,1) //返回结果为 'H' *0和1都是表示截取的开始位置为第一个字符 substr('Hello World',2,4) //返回结果为 'ello' substr('Hello World',-3,3)//返回结果为 'rld' *负数(-i)表示截取的开始位置为字符串右端向左数第i个字符 例子: select substr('H…

2015-01-30 15:19 · sql + oracle · SQL Server · Oracle