C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » SQL Server »

foreign key


Posted Date: 01 Sep 2007      Posted By: raajee      Member Level: Silver     Points: 2   Responses: 1



create table a1
(
imgid int primary key identity(1,1),
headline varchar(100),
description varchar(400)
)



create table a2(imgid int foreign key references a1(imgid) on delete cascade,a5 varchar(10),a6 varchar(10))

select * from a2
create table a1
(
imgid int primary key identity(1,1),
headline varchar(100),
description varchar(400)
)



create table a2(imgid int foreign key references a1(imgid) on delete cascade,a5 varchar(10),a6 varchar(10))
insert into a2 values(1,'b','c')-----this one is wrong
select * from a2
in this case i am not entering the imgid values from frontend now wat can i do?





Responses

Author: sathiyasivam    01 Sep 2007Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hi Raaj

I can't get you ,coulg you explain me claerly. What error ur getting ?



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Data and log files expand by what increment?
Previous : how to delete data base in SQLExpress & MSDE
Return to Discussion Forum
Post New Message
Category: SQL Server

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use