Tech TutorBangla Web Documentation
Portfolio
HomeHTMLCSSTailwind CSSJavaScriptTypeScriptReactNext.jsNode.jsExpressSocket.IOExpoWordPressPostgreSQLPrismaPostgresNestJSMongoDBDockerTanStackTanStack TableRTK QueryGitGitHub
  • PostgreSQL Documentation40টি অধ্যায়
প্রযুক্তি নির্বাচন
HomeHTMLCSSTailwind CSSJavaScriptTypeScriptReactNext.jsNode.jsExpressSocket.IOExpoWordPressPostgreSQLPrismaPostgresNestJSMongoDBDockerTanStackTanStack TableRTK QueryGitGitHub
  • Postgres Intro
  • Relational Model
  • Install & Setup
  • Connect psql
  • SELECT basics
  • Data Types
  • Create Table
  • Constraints
  • INSERT / UPDATE / DELETE
  • NULL & COALESCE
  • Schema Design
  • Relationships
  • Joins
  • Joins Advanced
  • Aggregation
  • ORDER / LIMIT
  • String Functions
  • Date Functions
  • Subqueries
  • CTE (WITH)
  • Views
  • Window Functions
  • Transactions
  • Indexes
  • Performance
  • UPSERT
  • JSONB
  • Full-Text Search
  • Triggers
  • Roles & Privileges
  • Backup & Restore
  • Node + PostgreSQL
  • Prisma Intro
  • Prisma Migrations
  • TechShop Schema
  • TechShop Queries
  • TechShop API
  • Best Practices
  • Common Mistakes
  • Interview Questions
  1. Docs
  2. PostgreSQL
  3. CREATE TABLE, ALTER TABLE, DROP TABLE
PostgreSQLBeginner

CREATE TABLE, ALTER TABLE, DROP TABLE

table তৈরি/বদল/মুছে ফেলা — schema-র জীবনচক্র।

4টি অংশবাংলা ভাষায়
products tablesql
sql
CREATE TABLE products (
  id          bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
  name        text NOT NULL,
  price       numeric(10,2) NOT NULL,
  qty         integer NOT NULL DEFAULT 0,
  created_at  timestamptz DEFAULT now()
);
ALTER + DROPsql
sql
-- নতুন column
ALTER TABLE products ADD COLUMN category text;

-- column মুছুন
ALTER TABLE products DROP COLUMN category;

-- table মুছুন
DROP TABLE products;
  • GENERATED ALWAYS AS IDENTITY — auto-increment id (SERIAL-এর আধুনিক বিকল্প)
  • DEFAULT — column-এ নির্দিষ্ট default মান
  • DROP TABLE-এ IF EXISTS দিয়ে error এড়ানো যায়
DROP সাবধান

Production-এ DROP/ALTER যায়-ই আসে-ই — ALTER ... DROP COLUMN আগে transaction-এ পরীক্ষা করে নিন (টপিক ২৩)।

শেষ প্যারায় নিজে practice করুন — কোড কপি করে নিজের এডিটরে চালিয়ে দেখুন।
আগেরCommon Data Types — text, numeric, date, uuidপরেরConstraints — NOT NULL, UNIQUE, CHECK, DEFAULT
Tech Tutor

বাংলায় ওয়েব ডেভেলপমেন্ট ডকুমেন্টেশন শিখুন — ধাপে ধাপে।

Homeসব ডকুমেন্টেশনQuick Startআমার নোটস

© 2026 Tech Tutor. বাংলায় শিখুন, বাংলায় গড়ুন।

mdanamolhasan1998@gmail.com