postgres delete table code example
Example 1: how to remove tables from postgresql
DROP TABLE IF EXISTS tablename;
Example 2: possgress drop if exists table
drop table if exists tableName
Example 3: postgres create table
-- Basic table creation
CREATE TABLE table_name(
column1 datatype,
column2 datatype,
column3 datatype,
.....
columnN datatype,
PRIMARY KEY( one or more columns )
);
Example 4: postgresql drop table
DROP TABLE name;
Example 5: postgres clear table
TRUNCATE [ TABLE ] [ ONLY ] name [ * ] [, ... ]
[ RESTART IDENTITY | CONTINUE IDENTITY ] [ CASCADE | RESTRICT ]
Example 6: psql delete table
DROP TABLE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]