DROP FOREIGN TABLE(7) PostgreSQL 9.2.7 Documentation DROP FOREIGN TABLE(7)NAME
DROP_FOREIGN_TABLE - remove a foreign table
DROP FOREIGN TABLE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
DROP FOREIGN TABLE removes a foreign table. Only the owner of a foreign table can remove it.
Do not throw an error if the foreign table does not exist. A notice is issued in this case.
The name (optionally schema-qualified) of the foreign table to drop.
Automatically drop objects that depend on the foreign table (such as views).
Refuse to drop the foreign table if any objects depend on it. This is the default.
To destroy two foreign tables, films and distributors:
DROP FOREIGN TABLE films, distributors;
This command conforms to the ISO/IEC 9075-9 (SQL/MED), except that the standard only allows one foreign table to be dropped per command,
and apart from the IF EXISTS option, which is a PostgreSQL extension.
ALTER FOREIGN TABLE (ALTER_FOREIGN_TABLE(7)), CREATE FOREIGN TABLE (CREATE_FOREIGN_TABLE(7))
PostgreSQL 9.2.7 2014-02-17 DROP FOREIGN TABLE(7)
Check Out this Related Man Page
DROP TABLE(7) SQL Commands DROP TABLE(7)NAME
DROP TABLE - remove a table
DROP TABLE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
DROP TABLE removes tables from the database. Only its owner can drop a table. To empty a table of rows without destroying the table, use
DELETE [delete(7)] or TRUNCATE [truncate(7)].
DROP TABLE always removes any indexes, rules, triggers, and constraints that exist for the target table. However, to drop a table that is
referenced by a view or a foreign-key constraint of another table, CASCADE must be specified. (CASCADE will remove a dependent view
entirely, but in the foreign-key case it will only remove the foreign-key constraint, not the other table entirely.)
Do not throw an error if the table does not exist. A notice is issued in this case.
name The name (optionally schema-qualified) of the table to drop.
Automatically drop objects that depend on the table (such as views).
Refuse to drop the table if any objects depend on it. This is the default.
To destroy two tables, films and distributors:
DROP TABLE films, distributors;
This command conforms to the SQL standard, except that the standard only allows one table to be dropped per command, and apart from the IF
EXISTS option, which is a PostgreSQL extension.
ALTER TABLE [alter_table(7)], CREATE TABLE [create_table(7)]
SQL - Language Statements 2010-05-14 DROP TABLE(7)
MSG="THERE WERE XX RECORDS IN ERROR TABLE,AAAA, WHEN LOADING THE BBBB TABLE WITH EXTRACT FROM CCCC INTO TABLES FOR , DATABASE DDDD."
echo "$MSG" > /tmp/mplanmsg.$$.out
I wan to replace XX with the content in $recordXX
cat /tmp/mplanmsg.$$.out|sed 's/XX/\$recordXX/g'| sed... (3 Replies)
I have a file that has the something like the following :
REM CREATE TABLE lots of text
REM table specifc creation text ;
REM ALTER TABLE lots of text
REM text specific to the the alter command
REM could be more lines of text;
What I need is to get all the lines for the ALTER... (2 Replies)
I use the following command to know the create table structure.
mysqldump myDBName myTBName -d --compact
And I get the following output...
CREATE TABLE `tblThreads` (
`threadID` smallint(4) unsigned zerofill NOT NULL auto_increment,
`threadTitle` varchar(255) NOT NULL default '',... (7 Replies)
I have a Line input for awk as follows
DROP MATERIALIZED VIEW MCR.COMM_STACK;
CREATE MATERIALIZED VIEW "MCR"."COMM_STACK"
ON PREBUILT TABLE WITHOUT REDUCED PRECISION
REFRESH FAST ON DEMAND START WITH sysdate+0 NEXT SYSDATE + 7
WITH PRIMARY KEY USING DEFAULT... (3 Replies)
Please help me to resolve the below query.
My shell script has generated a file output.file like below
DROP TABLE GPS_CONTACT_DETAILS
DB20000I The SQL command completed successfully.
CREATE TABLE GPS_CONTACT_DETAILS ( CONTACT_ID ... (8 Replies)
I get some differents output from a bash script.
My goal is to sort them in a kind of table, something like:
Actually the table can change and I don't care about the shape, I'm just looking if there's a well know way to put the output of a script in a table or if someone has his own best... (2 Replies)
I need to extract the table name from an oracle control file which comes as the last word in the third line.
INTO TABLE SCOTT.EMP_SAL
FIELDS TERMINATED BY..........
what i want to to is write the table name SCOTT.EMP_SAL to a... (2 Replies)
How can I extract table name from the different DDL statement like
CREATE TABLE etc
Basically I have to parse thr the any of the DDL statement and verify if that DDL statement is implemented by DBA or not.
how can i do this efficiently in Kornshell scripting. (2 Replies)
My file content is:
CREATE TABLE "FACT_WORLD" (
"AR_ID" INTEGER NOT NULL,
"ORG_ID" INTEGER NOT NULL
DATA CAPTURE NONE
I want to change this file to have entries in one... (6 Replies)
what I'm trying to do is ... need to drop tables w/ names like
For this, I want to write a query "DROP TABLE ABC_var_2001".
now "var" should be either NY, ORD, TX or CL.
I'm new to programming so don't know how to create a variable w/ OR... (3 Replies)
I have a requirement to search for a pattern in each line in a file and remove the in between words till the 3rd occurrence of double quote (").
Ex: CREATE TABLE "SCHEMANAME"."AMS_LTV_STATUS"
(Note: "SCHEMANAME" may changes for different schemas. Its not a fixed value)
I need to... (2 Replies)
Hi I have a file where i want to remove a char before a specific pattern.
C, ----comma needs to be removed
C, ----comma needs to be removed
So i want to delete the comma(,) after the C both ways.Pattern can be... (11 Replies)
As per my biz requirement, I need to drop the partition from our PROD table based on the retention period.
Hence I have written the script and called the drop partition procedure within the script.
The procedure is working fine and droped the partition from the table when I execute... (4 Replies)