上一页 1 2 3 4 5 6 7 ··· 19 下一页
  2013年1月23日
摘要: Oracle Database 11g introduced new feature – virtual column. Instead storing data, the virtual column is calculated based on an expression stored in data dictionary. Let’s assume you have a table that stores customer information. The customer names are stored in two separate columns – first_name and 阅读全文
posted @ 2013-01-23 07:51 Simon Han 阅读(218) 评论(0) 推荐(0) 编辑
摘要: You declare PL/SQL variables, constants and types in declare block. The syntax is <name> [CONSTANT] <datatype> [NOT NULL] [:= | DEFAULT <expr>]<name> is the name of the variable or constant;<datatype> may be scalar, composite datatype, reference or LOB;<expr> is a 阅读全文
posted @ 2013-01-23 07:46 Simon Han 阅读(519) 评论(0) 推荐(0) 编辑
摘要: 引用自:http://blog.csdn.net/ggjjzhzz/archive/2005/10/17/507880.aspx在某些场合下,存储过程或触发器里的SQL语句需要动态生成。Oracle的DBMS_SQL包可以用来执行动态SQL语句。本文通过一个简单的例子来展示如何利用DBMS_SQL包执行动态SQL语句:DECLARE v_cursor NUMBER; v_stat NUMBER; v_row NUMBER; v_id NUMBER; v_no VARCHAR(100); v_date DATE; v_sql VARCHAR(200); s_id NUMBER; s_date D 阅读全文
posted @ 2013-01-23 07:34 Simon Han 阅读(20707) 评论(0) 推荐(1) 编辑
摘要: Here is a simple recipe. The following SQL finds the top ten SQL statements with the greatest elapsed time.SELECT sql_id, child_number, sql_text, elapsed_time FROM (SELECT sql_id, child_number, sql_text, elapsed_time, cpu_time, d... 阅读全文
posted @ 2013-01-23 07:19 Simon Han 阅读(640) 评论(0) 推荐(0) 编辑
摘要: ProblemYou need to find when a PL/SQL procedure in an Oracle Database was updated.SolutionThe following SQL query returns information about a FIND_USER procedure, defined in the current user’s schema. The information returned includes procedure name, date procedure was created and date procedure was 阅读全文
posted @ 2013-01-23 07:07 Simon Han 阅读(476) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 19 下一页