博客园  :: 联系 :: 管理

2007年10月7日

摘要: 一、SQLPLUS1引言SQL命令以下17个是作为语句开头的关键字:alterdroprevokeauditgrantrollback*commit*insertselectcommentlockupdatecreatenoauditvalidatedeleterename这些命令必须以“;”结尾带*命令句尾不必加分号,并且不存入SQL缓存区。SQ... 阅读全文

posted @ 2007-10-07 22:31 独孤雁 阅读(418) 评论(0) 推荐(0)

摘要: SQL函数的简短说明1.字符串函数长度与分析用datalength(Char_expr) 返回字符串包含字符数,但不包含后面的空格substring(expression,start,length) 不多说了,取子串right(char_expr,int_expr) 返回字符串右边int_expr个字符字符操作类upper(char_expr) ... 阅读全文

posted @ 2007-10-07 16:43 独孤雁 阅读(246) 评论(0) 推荐(0)

摘要: --聚合函数use pubsgoselect avg(distinct price) --算平均数from titleswhere type='business'go use pubsgoselect max(ytd_sales) --最大数from titlesgo use pubsgoselect min(ytd_sales) --最小数from titlesgo use pubsgose... 阅读全文

posted @ 2007-10-07 16:27 独孤雁 阅读(240) 评论(0) 推荐(0)