Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

table Expand / Collapse
i want to write a query that delete my relation and then truncate my table
Poll ResultsVotes
truncate table
 
100%
3
Member Votes: 3, Anonymous Votes: 0. You don't have permission to vote within this poll.
Author
Message
Posted Friday, August 16, 2013 11:24 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, January 12, 2014 6:14 AM
Points: 1, Visits: 38
truncate table
Post #1485435
Posted Saturday, August 17, 2013 2:32 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 2:01 PM
Points: 40,390, Visits: 36,823
What's the question here?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1485460
Posted Sunday, August 18, 2013 9:34 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 3, 2014 1:55 PM
Points: 199, Visits: 735
I think "add poll" is the wrong command for you. It's for asking a question and let the people vote.
Try to use "add topic" and ask your question again. The topic is for describing and discussing questions
Post #1485593
Posted Monday, August 19, 2013 6:09 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 10:40 AM
Points: 5,245, Visits: 12,159
WolfgangE (8/18/2013)
I think "add poll" is the wrong command for you.


Especially when there is only one answer to select from .. truncate table or ... nothing



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1485746
Posted Monday, August 19, 2013 12:14 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, November 5, 2014 10:05 AM
Points: 1,549, Visits: 490
There are plenty of scripts available to check for foreign key constraints and disable them, truncate then re-enable them. Also you should be aware of the difference between the truncate and delete commands.

Do a google search like 'delete relation ships then truncate table'
Post #1485939
Posted Monday, August 19, 2013 5:46 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Friday, October 24, 2014 12:38 PM
Points: 522, Visits: 240
I think he wants to just go for truncate table . hence no other option
Post #1486069
Posted Tuesday, August 20, 2013 5:48 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Wednesday, November 12, 2014 9:37 PM
Points: 1,454, Visits: 136
What are you expecting?
Post #1486192
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse