Horje
how to drop all tables in postgresql Code Example
how to remove tables from postgresql
DROP TABLE IF EXISTS tablename;
force drop all tables postgres
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
how to drop all tables in postgresql
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;

GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO public;
postgres drop all tables
DO $$ 
  DECLARE 
    r RECORD;
BEGIN
  FOR r IN 
    (
      SELECT table_name 
      FROM information_schema.tables 
      WHERE table_schema=current_schema()
    ) 
  LOOP
     EXECUTE 'DROP TABLE IF EXISTS ' || quote_ident(r.table_name) || ' CASCADE';
  END LOOP;
END $$ ;
Source: kags.me.ke




Sql

Related
alter table fulltext Code Example alter table fulltext Code Example
enable full text search mysql Code Example enable full text search mysql Code Example
sql where time stamp is in between Code Example sql where time stamp is in between Code Example
install mysqldump Code Example install mysqldump Code Example
allow null in psql Code Example allow null in psql Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7