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. When you delete a table,its strututral definition,data,indexes,views,constraints are permanently deleted from a database?

When you delete a table,its strututral definition,data,indexes,views,constraints are permanently deleted from a database?

Scheduled Pinned Locked Moved Database
databasequestion
4 Posts 4 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.
  • S Offline
    S Offline
    srushti08
    wrote on last edited by
    #1

    When you delete a table,its strututral definition,data,indexes,views,constraints are permanently deleted from a database? srushti08

    S R Y 3 Replies Last reply
    0
    • S srushti08

      When you delete a table,its strututral definition,data,indexes,views,constraints are permanently deleted from a database? srushti08

      S Offline
      S Offline
      Stephen McGuire
      wrote on last edited by
      #2

      Yes, usually... In SQL Server, you can setup a 'View' in such a way that it prevents a participating table from being deleted...I think! Unless you store the schema of a table in some other way, the structural definition will be lost too. Steve

      1 Reply Last reply
      0
      • S srushti08

        When you delete a table,its strututral definition,data,indexes,views,constraints are permanently deleted from a database? srushti08

        R Offline
        R Offline
        Rob Graham
        wrote on last edited by
        #3

        If you use "drop table", yes. If what you really want to do is just remove all the data, you should use "truncate table..."

        1 Reply Last reply
        0
        • S srushti08

          When you delete a table,its strututral definition,data,indexes,views,constraints are permanently deleted from a database? srushti08

          Y Offline
          Y Offline
          yetanotherchris
          wrote on last edited by
          #4

          Sounds like a school question. All data and schemas are deleted, however views won't be removed, you may get a warning however and the delete won't work if you have SCHEMABINDING in your views. Constraints will stop the delete working too, so they'll need to be removed from other questions. Try deleting a table, that's the easiest way to find out.

          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