Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下问题。我想从我的表中选择一条记录。该表具有复合主键。此选择位于接受两个 int 参数的存储过程中。
这是我的查询:
SELECT @test := 1 FROM MyTable WHERE col1 = param1 AND col2 = param2;
col1 和 col2 是复合键。简而言之,我想选择与我的复合键列值匹配的一行。提前致谢。