Home » SQL & PL/SQL » SQL & PL/SQL » To create External table for database table (Oracle 10g/11g)
To create External table for database table [message #614036] Wed, 14 May 2014 15:10 Go to next message
Nellai
Messages: 2
Registered: May 2014
Junior Member
Hi,
This question have asked to my friend in a interview

say we have a table EMP

I said like
To spool the EMP table then we have to create external table using that file. Smile

Is it Possible to create a external table for EMP. Do we have any straight query to do that.
Re: To create External table for database table [message #614037 is a reply to message #614036] Wed, 14 May 2014 15:12 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
I am not really sure what you are asking here.

Spooling output from a SQL statement has nothing to do with an external table.

You can spool a select statement whether it is an external table or a real table. the SELECT does not care.

You can spool from a table into a file that an external table can be based off of, but spool works on the client side and external table exist on the server side, so unless the client is the server, you will not be able to do that.

[Updated on: Wed, 14 May 2014 15:14]

Report message to a moderator

Re: To create External table for database table [message #614038 is a reply to message #614036] Wed, 14 May 2014 15:38 Go to previous messageGo to next message
John Watson
Messages: 8931
Registered: January 2010
Location: Global Village
Senior Member
The interviewer may have been asking if your colleague knows that Data Pump can write to an external table. This example is from the Utilities Guide:
SQL> CREATE TABLE inventories_xt
  2  ORGANIZATION EXTERNAL
  3  (
  4    TYPE ORACLE_DATAPUMP
  5    DEFAULT DIRECTORY def_dir1
  6    LOCATION ('inv_xt.dmp')
  7  )
  8  AS SELECT * FROM inventories;

Re: To create External table for database table [message #614510 is a reply to message #614038] Thu, 22 May 2014 11:45 Go to previous message
Nellai
Messages: 2
Registered: May 2014
Junior Member
Thank-you/Nandri John Watson for your prompt response.
my thanks to joy_division too
Sorry for my late reply Sad
Previous Topic: Need procedure logic
Next Topic: Reverse running sum
Goto Forum:
  


Current Time: Fri Apr 26 03:04:26 CDT 2024