oracl 和db2 常用语法比较: 1、取前N条记录 Oracle:Select * from TableName where rownum <= N; DB2:Select * from TableName fetch first N rows only; 2、取得系统日期 Oracle:Select sysdate from dual; DB2:Select current timestamp from sysibm.sysdummy1; 3、空值转换 Oracle:Select
如下所示:
# -*- coding: utf-8 -*-
# 简述:要求输入某年某月某日
# 提问:求判断输入日期是当年中的第几天?
def which_day(year,month,day):
list=[31,28,31,30,31,30,31,31,30,31,30,31]
whichday=0
if (year%4)==0 and (year0)!=0 or (year0)==0:
list[1]=29
for i in range(1,month):