清除案例中的同步(Synchronization in Clear Case)
我是ClearCase UCM的新手,想要了解一些非常基础的东西
如果我有一个主分支,称为Integration Stream。 此外,还有一个子分支,称为开发流,如果我创建另一个开发流,它是现有开发流的子代,我将能够进行这个新开发的同步(重新基础和交付)流(子子分支)与主分支/集成流?
I am new to ClearCase UCM and want to understand something very basic
If I have a main branch, called Integration Stream. Also, there is a sub-branch of that, which is called development stream and if I create another development stream which is child of an existing development stream, will I be able to do synchronization (re-base and deliver) of this new development stream (sub-sub-branch) with the main branch/integration stream ?
原文:https://stackoverflow.com/questions/17420940
最满意答案
您需要了解常规子查询和相关子查询之间的区别。
使用您的示例,这应该很容易。 第一个
where
子句是:where not exists (Select 1 from Population2 join Population1 on Population2.payer_id = Population1.payer_id )
这种情况确实如它所说的那样。 子查询没有连接到外部查询。 因此,
not exists
将过滤掉所有行或保留所有行。在这种情况下,引擎运行子查询并确定至少返回一行。 因此,
not exists
在所有情况下都返回false,并且不返回任何内容。在第二种情况下,子查询是相关子查询。 因此,对于
population1
的每一行,使用Population1.payer_id
的值运行子查询。 在某些情况下,Population2
存在匹配的行; 这些被过滤掉。 在其他情况下,匹配行不存在; 这些都在结果集中。You need to understand the distinction between a regular subquery and a correlated subquery.
Using your examples, this should be easy. The first
where
clause is:where not exists (Select 1 from Population2 join Population1 on Population2.payer_id = Population1.payer_id )
This condition does exactly what it says it is doing. The subquery has no connection to the outer query. So, the
not exists
will either filter out all rows or keep all rows.In this case, the engine runs the subquery and determines that at least one row is returned. Hence,
not exists
returns false in all cases, and the nothing is returned.In the second case, the subquery is a correlated subquery. So, for each row in
population1
the subquery is run using the value ofPopulation1.payer_id
. In some cases, matching rows exist inPopulation2
; these are filtered out. In other cases, matching rows do not exist; these are in the result set.
相关问答
更多-
不,这已经被覆盖了一百八十亿次。 SQL Server是智能的,并且知道它正在用于EXISTS,并将NO DATA返回给系统。 Quoth Microsoft: http ://technet.microsoft.com/en-us/library/ms189259.aspx?ppud =4 由EXISTS引入的子查询的选择列表几乎总是由一个星号(*)组成。 没有理由列出列名称,因为您只是测试是否存在符合子查询中指定条件的行。 另外,不要相信我? 尝试运行以下操作: SELECT whatever FR ...
-
SELECT top 1 * FROM OrganizationUserSettings WHERE SettingSys = 3 AND OrganizationSys = 1012 and (OrgUserSettingsProfileSys = @OrgUserSettingsProfileSys or OrgUserSettingsProfileSys is NULL) order by OrgUserSettingsProfileSys desc SELECT top 1 * FROM ...
-
每次你“运行脚本”时,sqlfiddle都会重新生成数据库内容,显然。 在与更新相同的脚本中运行select。 来自sqlfiddle的Oracle查询几乎可行,但您忘记了别名userid参数。 正确的查询: /* How you would do it on Oracle */ UPDATE UserInfo SET username = 'not found' WHERE NOT EXISTS (SELECT 'X' FROM UserOrder b ...
-
您需要在连接中包含size_id ,以便只获取该用户的大小。 SELECT i.*, st.*, ss.* FROM inventory as i JOIN style as st ON i.style = st.style JOIN style_sizes as ss ON st.style_id = ss.style_id AND i.size_id = ss.size_id WHERE i.user_id = :user_id AND i.style = :style You ne ...
-
如何使用此SELECT语句使用EXISTS和子查询[关闭](How to use EXISTS and a subquery with this SELECT Statement [closed])[2023-01-01]
这应该产生相同的结果并使用EXISTS: select countrycode, name as country, language from country y where exists (select 'fish' from countrylanguage x where x.countrycode = y.code and x.language = 'German') order by country; 使用EXISTS子查询,如果 ... -
我会为M:N基数使用通用的关系型方法 CREATE TABLE company (cid integer primary key, company_name text); CREATE TABLE contact_person (pid integer primary key, person_name text); CREATE TABLE contact( cid integer references company, pid integer references contact_pers ...
-
加入“存在”子查询(Join within an “exists” subquery)[2022-03-15]
您需要了解常规子查询和相关子查询之间的区别。 使用您的示例,这应该很容易。 第一个where子句是: where not exists (Select 1 from Population2 join Population1 on Population2.payer_id = Population1.payer_id ) 这种情况确实如它所说的那样 ... -
不确定您的解决方案有多好,但是这里是如何使用SQLAlchemy编写SQL查询: from sqlalchemy.dialects.postgresql import array # First write the subquery. array() function is used for Pg ARRAY literals. subq = db.session.query( db.func.unnest(array([1])).label('model_id'), db.func.u ...
-
您可以使用LEFT JOIN而不是EXISTS编写反连接: SELECT t1.* FROM Table1 t1 LEFT JOIN Table2 t2 ON t2.Id = t1.Id WHERE t2.Id IS NULL 但是对于EXISTS运算符, 您必须有一个子查询 。 You could write an anti-join using LEFT JOIN instead of an EXISTS: SELECT t1.* FROM Table1 t1 LEFT JOIN Table ...
-
是的,它可以做到。 请尝试以下查询: SELECT tRec.* FROM tblRecords tRec INNER JOIN tblResults tRes ON tRec.ResultId = tRes.ResultId Yes it can be done. Try the query below: SELECT tRec.* FROM tblRecords tRec INNER JOIN tblResults tRes ON tRec.ResultId = tRes.ResultId