sql server - Drop Foreign Key without knowing the name of the constraint? -


मैंने निम्न कमांड का उपयोग कर एक तालिका बनाई है:

  टेबल बनाना तालिका 1 (आईडी int नहीं नल विदेशी कुंजी संदर्भ अद्यतन कैस्केड, यूज़रनेम नवरेचार (150), टाइम इंसटेकेंड्स इंट नल प्राथमिक कुंजी (आईडी, टाइम इनसेकंड) पर कैस्केड को हटाने पर तालिका 2 (आईडी);  

लेकिन अब मैं विदेशी कुंजी को छोड़ना चाहता हूं। जैसा कि मैंने बाधा का नाम दिया है, मैं उपयोग नहीं कर सकता:

  टेबल को बदलें & lt; tablename & gt; विदेशी कुंजी ड्रॉप करें & amp; विदेशी कुंजी नाम & gt;  

क्या कोई तरीका है? Pls help।

आप INFORMATION_SCHEMA.TABLE_CONSTRAINTS

  INFORMATION_SCHEMA.TABLE_CONSTRAINTS से CONSTRAINT_NAME चुनें जहां TABLE_NAME = 'Table1'  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -