[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 580
  • Last Modified:

Sql Server - Can not truncate Table

Hi..
I'm getting the following
Cannot truncate table 'myTable' because it is being referenced by a FOREIGN KEY constraint.

How can find the FOREIGN KEY constraint and remove it - and find the other 'tables'

thx
0
JElster
Asked:
JElster
1 Solution
 
jetskij16Commented:
If you have management studio you can look under TableName--Keys to see all foreign keys of the table.

You need to be careful you don't destroy data in the referenced tables.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now