1.知识点:可以对照下面的录屏进行阅读
SQL> --字符函数
SQL> --字符串的转换
SQL> select lower('hellO WORld') 转小写,upper('hellO WORld') 转大写,initcap('hello world') 首字母大写
2 from dual;
SQL> --substr(a,b) 从a中,第b位开始取,取右边所有的字符
SQL>...
分类:
数据库 时间:
2014-06-11 06:36:18
阅读次数:
307
1.取月初的时间 --getdate() :2012/05/08 19:29:00 select
convert(varchar,dateadd(day,-day(getdate())+1,getdate()),111) --结果:2012/05/08
2.取月末时间 select convert....
分类:
数据库 时间:
2014-06-10 13:12:24
阅读次数:
418
OCP 053:192.What is the purpose of the until
change option of the restore command?A. It allows you to select the SCN that you
want to restore to.B. It...
分类:
其他好文 时间:
2014-06-10 13:10:23
阅读次数:
315
1.求当天的年份 (getdate(): 2012/05/08 18:07:26) SELECT
YEAR(GETDATE()) --20122. 求当天的月份 SELECT MONTH(GETDATE()) --53. 求当天的日 SELECT
DAY(GETDATE()) --84....
分类:
数据库 时间:
2014-06-10 10:08:32
阅读次数:
310
select msi.segment1 装配件编码 ,msi.description 装配件描述
,msi.item_type类型 ,msi.planner_code 计划员 ,msi1.segment1部件编码 ,msi1.description 部件描述
,msi1.primary_unit_o...
分类:
数据库 时间:
2014-06-10 09:31:16
阅读次数:
568
比较下面两个SQL语句: select *from erp_purchase A join
erp_purchasedetails B on A.id=B.id; ( 77,335 总计, 查询花费 0.0013 秒) select *from
erp_purchase A join (s...
分类:
其他好文 时间:
2014-06-10 09:08:49
阅读次数:
202
今天正好有个新需求,要求在一张表中,保证不插入重复的记录。即,保证每条记录中的某个字段的值不重复。下面是我给出的SQL语句://
判断表中现有字段3的值是否与新插入记录的字段3的值相同,如果不同则插入新数据。INSERT INTO 表名称 (字段1, 字段2, 字段3)SELECT
插入值1, 插入...
分类:
数据库 时间:
2014-06-10 08:42:55
阅读次数:
248
The oldest solution that people still use for
this problem is select(). The select() call takes three sets of fds (implemented
as bit arrays): one for...
分类:
编程语言 时间:
2014-06-10 08:26:42
阅读次数:
325
有三个表Discuss_TableTalk_TableUser_Table然后查询出三个表的所有内容或者可以查询部分内容。下面的语句是测试过的,拿出来分享下!select
* from(select row_number() over(order by D_id desc)as rownum,a.*...
分类:
数据库 时间:
2014-06-10 00:33:52
阅读次数:
327