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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. please help me figure out why the heck i can't change the primary key or drop the table in sql 2008 express

please help me figure out why the heck i can't change the primary key or drop the table in sql 2008 express

Scheduled Pinned Locked Moved Database
databasehelpquestionsql-serversysadmin
4 Posts 2 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.
  • T Offline
    T Offline
    tonyonlinux
    wrote on last edited by
    #1

    Okay I made 4 tables books, Author, bookauthor(this is the linktable), booknumber well I wanted to take and make the books.ID indentity field set to yes but NOO NO NO sql server will not let me me. says something to do with the schema-bound dependencies. So in the diagram view I removed the links from the tables which i thought removed the relationships.   Well tried again same exact error. SO, I go alright I will take and delete the table and start over, that didn't work either same error of schema-bound dependencies. HOW THE HECK DO YOU REMOVE THE RELATIONSHIPS? So, now when i right click on books it gives me the error that is marked for deletion. How do I unmark it or delete it or whatever? I mean is it really this complicated ? :((

    M 1 Reply Last reply
    0
    • T tonyonlinux

      Okay I made 4 tables books, Author, bookauthor(this is the linktable), booknumber well I wanted to take and make the books.ID indentity field set to yes but NOO NO NO sql server will not let me me. says something to do with the schema-bound dependencies. So in the diagram view I removed the links from the tables which i thought removed the relationships.   Well tried again same exact error. SO, I go alright I will take and delete the table and start over, that didn't work either same error of schema-bound dependencies. HOW THE HECK DO YOU REMOVE THE RELATIONSHIPS? So, now when i right click on books it gives me the error that is marked for deletion. How do I unmark it or delete it or whatever? I mean is it really this complicated ? :((

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      tonyonlinux wrote:

      I mean is it really this complicated

      It sure can be, your dealing with a database after all, not Access. Are you using management studio? Expand the table,inspect keys and constraints and deal with the ones you need to remove. You may have a setting that will not allow you to make table dropping changes set also. Although setting a identity column should not affect this. Make sure the ID column is int or bigint, this data change may screw you up as well.

      Never underestimate the power of human stupidity RAH

      T 1 Reply Last reply
      0
      • M Mycroft Holmes

        tonyonlinux wrote:

        I mean is it really this complicated

        It sure can be, your dealing with a database after all, not Access. Are you using management studio? Expand the table,inspect keys and constraints and deal with the ones you need to remove. You may have a setting that will not allow you to make table dropping changes set also. Although setting a identity column should not affect this. Make sure the ID column is int or bigint, this data change may screw you up as well.

        Never underestimate the power of human stupidity RAH

        T Offline
        T Offline
        tonyonlinux
        wrote on last edited by
        #3

        Yes, I'm using the management tool provided with the express edition. In any event I got the table to drop after reading your message about looking at the constraints I just didn't know where they were listed. I see now thanks. do you recommend any free books that are really good to learn this stuff? Like library books or online stuff? Or even something not expensive so I can learn this? I bought the t-sql videos from trainingspot and i'm also a lifetime member of learnvisual.net and they help but I'm finding I get a lot of good answers and almost instant support from here. thank you and the rest that have helped me sooooooo!!!!!! much !!!!!!!!!

        M 1 Reply Last reply
        0
        • T tonyonlinux

          Yes, I'm using the management tool provided with the express edition. In any event I got the table to drop after reading your message about looking at the constraints I just didn't know where they were listed. I see now thanks. do you recommend any free books that are really good to learn this stuff? Like library books or online stuff? Or even something not expensive so I can learn this? I bought the t-sql videos from trainingspot and i'm also a lifetime member of learnvisual.net and they help but I'm finding I get a lot of good answers and almost instant support from here. thank you and the rest that have helped me sooooooo!!!!!! much !!!!!!!!!

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          tonyonlinux wrote:

          do you recommend any free books that are really good to learn this stuff

          Sorry my training days are so out of date the material is probably not in print any longer :-D SQL Server Central is a good resource for learning, completely sql server centric whereas CP has a wider audience. I find CP more useful for support for that reason, wider experience/knowledge

          Never underestimate the power of human stupidity RAH

          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