English 中文(简体)
SQL 查看没有绘制行的位置
原标题:SQL View where rows not mapped

Basically what I m trying to figure out is, Say I have

表1tbl1

ID @ name 名称

和表2tbl2

ID @ name 名称

然后我有一个绘图表 mt

ID tbl1ID tbl2ID

这里的数据其实并不重要,这些表格就是例子。

如何制作 < code> view , 来抓取 < code> tbl1 中所有未绘制到 < code> > mt 的项目 。

顺便说一句,我使用微软 SQL-Server 2008。

最佳回答
CREATE VIEW v_unmapped
AS
SELECT  *
FROM    tbl1
WHERE   id NOT IN
        (
        SELECT  tbl1Id
        FROM    mt
        )
问题回答

暂无回答




相关问题
Export tables from SQL Server to be imported to Oracle 10g

I m trying to export some tables from SQL Server 2005 and then create those tables and populate them in Oracle. I have about 10 tables, varying from 4 columns up to 25. I m not using any constraints/...

SQL server: Can NT accounts be mapped to SQL server accounts

In our database we have an SQL server account that has the correct roles to access some of the databases. We are now switching to windows authentication and I was wondering if we can create a NT user ...

SQL Server 2000, ADO 2.8, VB6

How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8

热门标签