Yahoo Web Search

Search results

  1. No downvote, but I would never recommend a CREATE TABLE AS SELECT for a global temporary table - a less experienced developer might get the wrong idea that they have to populate GTTs this way every time. Sure, this is a convenient way of copying the definition from another table, but the example will probably confuse some people. –

  2. Jan 17, 2009 · PRAGMA table_info(table-name); Explanation from sqlite.org: This pragma returns one row for each column in the named table. Columns in the result set include the column name, data type, whether or not the column can be NULL, and the default value for the column.

  3. In oracle SQL, how do I run an sql update query that can update Table 1 with Table 2's name and desc using the same id? So the end result I would get is. Table 1: id name desc ----- 1 x 123 2 y 345 3 c adf Question is taken from update one table with data from another, but specifically for oracle SQL.

  4. Feb 22, 2015 · PL SQL Temporary Table. 0. Creating temporary table without knowing the columns in oracle. 0. PL/SQL ...

  5. Oct 15, 2008 · SQL> tables2 Tables ===== TABLE_NAME NUM_ROWS BLOCKS UNFORMATTED_SIZE COMPRESSION INDEX_COUNT CONSTRAINT_COUNT PART_COUNT LAST_ANALYZED AN_IP_TABLE 0 0 0 Disabled 0 0 0 > Month PARTTABLE 0 0 0 1 0 1 > Month TST2 0 0 0 Disabled 0 0 0 > Month TST3 0 0 0 Disabled 0 0 0 > Month MANAGE_EMPLYEE 0 0 0 Disabled 0 0 0 > Month PRODUCT 0 0 0 Disabled 0 0 0 > Month ALL_TAB_X78EHRYFK 0 0 0 Disabled 0 0 0 ...

  6. Nov 26, 2009 · The best and most efficient way is to catch the "table not found" exception: this avoids the overhead of checking if the table exists twice; and doesn't suffer from the problem that if the DROP fails for some other reason (that might be important) the exception is still raised to the caller:

  7. Jul 2, 2012 · And in Oracle (Pre 12c).-- create table CREATE TABLE MAPS ( MAP_ID INTEGER NOT NULL , MAP_NAME VARCHAR(24) NOT NULL, UNIQUE (MAP_ID, MAP_NAME) ); -- create sequence CREATE SEQUENCE MAPS_SEQ; -- create tigger using the sequence CREATE OR REPLACE TRIGGER MAPS_TRG BEFORE INSERT ON MAPS FOR EACH ROW WHEN (new.MAP_ID IS NULL) BEGIN SELECT MAPS_SEQ.NEXTVAL INTO :new.MAP_ID FROM dual; END; /

  8. Jan 13, 2014 · The SQL engine parse and executes the SQL Statements but in some cases ,returns data to the PL/SQL engine. During execution a PL/SQL statement, every SQL statement cause a context switch between the two engine. When the PL/SQL engine find the SQL statement, it stop and pass the control to SQL engine.

  9. Nov 24, 2016 · This causes trouble if you have a table with the same name in two or more schemas - need to also include owner in the join: SELECT owner, column_name, position FROM all_cons_columns WHERE (owner, constraint_name) in (SELECT owner, constraint_name FROM all_constraints WHERE UPPER(table_name) = UPPER('&tableName') AND CONSTRAINT_TYPE = 'P') order by owner, position;

  10. I think you want a pipelined table function.. Something like this: CREATE OR REPLACE PACKAGE test AS TYPE measure_record IS RECORD( l4_id VARCHAR2(50), l6_id VARCHAR2(50), l8_id VARCHAR2(50), year NUMBER, period NUMBER, VALUE NUMBER); TYPE measure_table IS TABLE OF measure_record; FUNCTION get_ups(foo NUMBER) RETURN measure_table PIPELINED; END; CREATE OR REPLACE PACKAGE BODY test AS FUNCTION ...

  1. People also search for