var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: TRUNCATE Table
"You Cannot Use Truncate Table On A Table Referenced By A Foreign Key
Statecode Tinyint Primary Key
Rivercode Smallint Primary Key
Constraint Pkriverinstates Primary Key(Statecode,Rivercode),
Foreign Key (Statecode) References States(Statecode),
Foreign Key (Rivercode) References Rivers(Rivercode)
after removing all rows from RiverInStates Table using TRUNCATE and the command completed successfully.
when i tried to remove all rows from Rivers table , i got the following error.
"Server: Msg 4712, Level 16, State 1, Line 76
Cannot truncate table 'rivers' because it is being referenced by a FOREIGN
i thought the error may be due to the "Fkriverinstates" FOREIGN KEY CONSTRAINT. so i DROPped the constraint with
ALTER TABLE RiverinStates DROP CONSTRAINT Fkriverinstates
even after DROPping the constraint, im getting the same error
can any one point out where the problem is?
thanks in advance
you have (or had) two foreign key constraints in Riverinstates -- one named Fkriverinstates and the other unnamed -- and you need to drop the unnamed one as well