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. Self Referential table

Self Referential table

Scheduled Pinned Locked Moved Database
helpquestion
5 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.
  • I Offline
    I Offline
    indian143
    wrote on last edited by
    #1

    Hi, How can I create a foreign key column which is referencing the same tables another column. And if I have already created the table then how can I alter the table to enforce the same. Any link or any sort of help will be very much usefull.

    Thanks & Regards, Md. Abdul Aleem NIIT technologies

    P 1 Reply Last reply
    0
    • I indian143

      Hi, How can I create a foreign key column which is referencing the same tables another column. And if I have already created the table then how can I alter the table to enforce the same. Any link or any sort of help will be very much usefull.

      Thanks & Regards, Md. Abdul Aleem NIIT technologies

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      What have you tried?

      I 1 Reply Last reply
      0
      • P PIEBALDconsult

        What have you tried?

        I Offline
        I Offline
        indian143
        wrote on last edited by
        #3

        I got the answer just create in normal way how we create table in SQL Server.

        Thanks & Regards, Md. Abdul Aleem NIIT technologies

        P 1 Reply Last reply
        0
        • I indian143

          I got the answer just create in normal way how we create table in SQL Server.

          Thanks & Regards, Md. Abdul Aleem NIIT technologies

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          Exactly. A very handy technique.

          L 1 Reply Last reply
          0
          • P PIEBALDconsult

            Exactly. A very handy technique.

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            Learn something new every day. :doh:

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

            Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

            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