Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
xxxpeterxxx
Starting Member
1 Post |
Posted - 2008-07-21 : 02:03:34
|
Problem is i have entitytype field in the table customview. This entitytype is foreign key of name field in the table tab. I want to update the name field, but i cant bcz custoview table having only on delete cascade only. i want to alter the customview table and include the ON UPDATE CASECADE also. I don't how to do... Can u send the Query ASAP. CREATE TABLE `customview` ( `cvid` int(19) NOT NULL, `viewname` varchar(100) NOT NULL, `setdefault` int(1) default '0', `setmetrics` int(1) default '0', `entitytype` varchar(25) NOT NULL, PRIMARY KEY (`cvid`), KEY `customview_entitytype_idx` (`entitytype`), CONSTRAINT `fk_1_customview` FOREIGN KEY (`entitytype`) REFERENCES `tab` (`name`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 Result i need------------- CONSTRAINT `fk_1_customview` FOREIGN KEY (`entitytype`) REFERENCES `tab` (`name`) ON DELETE CASCADE ON UPDATE CASECADE |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-07-21 : 02:22:56
|
Which database engine is this? E 12°55'05.25"N 56°04'39.16" |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-07-21 : 03:05:47
|
£10 say it's MySQL Em |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-07-21 : 05:19:26
|
well as it says right there it's InnoDB it has to be mySql, no? _______________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.0 out! |
|
|
elancaster
A very urgent SQL Yakette
1208 Posts |
Posted - 2008-07-21 : 05:24:52
|
doh! oh well,... no £10 then? Em |
|
|
|
|
|