Run psql and Execute DROP TABLE

This is a simple example demonstrating how to run a SQL command using psql. Replace the commands below with your actual database schema.


-- Connect to PostgreSQL
psql -U your_username -d your_database -c "CREATE DATABASE your_database"

-- Create a sample table
psql -U your_username -d your_database -c "CREATE TABLE employees (id SERIAL PRIMARY KEY, name TEXT, department TEXT)"

-- Drop the table
psql -U your_username -d your_database -c "DROP TABLE employees"