C#SQL Express数据库更新问题 [英] c# sql express database update problem

查看:86
本文介绍了C#SQL Express数据库更新问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好;

我正在使用Visual Studio 2010和sql express数据库.
我在数据库中有3个表,它们是:

1. ehs_A列为id_A,名称(id具有主键和自动递增)

2. ehs_B列为id_B,年龄(id具有主键和自动递增)

3. ehs_main列为id_Main,id_A,id_B(id_Main具有主键和自动递增)(id_A,id_B是其他表的入门键)

将数据插入其他表时如何更新主表.

最好的问候
Aykut

Hi all;

I am working on visual studio 2010 and sql express database.
I have 3 tables in database, these are;

1. ehs_A columns are id_A, name (id has primary key and auto increment)

2. ehs_B columns are id_B, age (id has primary key and auto increment)

3. ehs_main columns are id_Main, id_A, id_B (id_Main has primary key and auto increment)(id_A, id_B is other tables primery keys)

how can i update the main table when i insert data to other tables.

Best Regards
Aykut

推荐答案

您可以使用sql触发器更新主表
you can update main table using sql trigger


这篇关于C#SQL Express数据库更新问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆