Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. how to drop a column

how to drop a column

Scheduled Pinned Locked Moved Database
questiontutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ArchaBhandare
    wrote on last edited by
    #1

    Can anyone Please tell me what is the command to drop a particular column from a table OR alter a table. Does it require that the table has no data while dropping a column ?

    A C 2 Replies Last reply
    0
    • A ArchaBhandare

      Can anyone Please tell me what is the command to drop a particular column from a table OR alter a table. Does it require that the table has no data while dropping a column ?

      A Offline
      A Offline
      Arun Immanuel
      wrote on last edited by
      #2

      Try this:

      ArchaBhandare wrote:

      Can anyone Please tell me what is the command to drop a particular column from a table.

      ALTER TABLE tableName DROP COLUMN columnName.

      ArchaBhandare wrote:

      Does it require that the table has no data while dropping a column ?

      No, it can have data...

      Regards, Arun Kumar.A

      1 Reply Last reply
      0
      • A ArchaBhandare

        Can anyone Please tell me what is the command to drop a particular column from a table OR alter a table. Does it require that the table has no data while dropping a column ?

        C Offline
        C Offline
        chand10
        wrote on last edited by
        #3

        Syntax to DROP a column: ALTER TABLE table_name DROP COLUMN column_name No,U can DROP the Column even if it contains data also.

        Cheers Chandu

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups