将Excel数据加载到视图中 - SQL Server

时间:2021-07-13 08:15:23

I have a view - called as View A and three other tables - Table A, Table B and Table c.

我有一个视图 - 称为视图A和其他三个表 - 表A,表B和表c。

Table A , Table B, Table C are connected to each other through Primary and foreign Keys.

表A,表B,表C通过主键和外键相互连接。

Then I created a View called as View A with column fields coming from those tables. I have the same columns available in my excel sheet. How, do I load that data inside the view. So, that the tables get updated.

然后我创建了一个名为View A的视图,其中包含来自这些表的列字段。我的Excel工作表中有相同的列。如何在视图中加载该数据。因此,表格会更新。

Note : - SQL Server Import Wizard didn't show the view created. It just showed the 3 tables.

注意: - SQL Server导入向导未显示创建的视图。它只显示了3个表格。

1 个解决方案

#1


0  

A view is a virtual table. A view consists of rows and columns just like a table. The difference between a view and a table is that views are definitions built on top of other tables (or views), and do not hold data themselves. If data is changing in the underlying table, the same change is reflected in the view.

视图是虚拟表。视图由行和列组成,就像表一样。视图和表之间的区别在于视图是在其他表(或视图)之上构建的定义,并且不会自己保存数据。如果基础表中的数据发生变化,则视图中会反映相同的更改。

Because a view is virtual you're unable to insert data into them without that data being present in the underlining tables first.

由于视图是虚拟的,因此您无法在没有首先在下划线表中存在该数据的情况下向其中插入数据。

#1


0  

A view is a virtual table. A view consists of rows and columns just like a table. The difference between a view and a table is that views are definitions built on top of other tables (or views), and do not hold data themselves. If data is changing in the underlying table, the same change is reflected in the view.

视图是虚拟表。视图由行和列组成,就像表一样。视图和表之间的区别在于视图是在其他表(或视图)之上构建的定义,并且不会自己保存数据。如果基础表中的数据发生变化,则视图中会反映相同的更改。

Because a view is virtual you're unable to insert data into them without that data being present in the underlining tables first.

由于视图是虚拟的,因此您无法在没有首先在下划线表中存在该数据的情况下向其中插入数据。