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.
我有一位同事想尝试以下查询:
INSERT INTO table (ColumnA, ColumnB, ColumnC) VALUES (?, (SELECT Id FROM ColumnD WHERE x=y), ?)
Sybase 对此抱怨,因为它似乎不允许在查询的 VALUES 部分中使用子查询。有谁知道解决这个问题的方法?
怎么样:
INSERT INTO table (ColumnA, ColumnB, ColumnC) SELECT ?, Id, ? FROM TableD WHERE x = y
(或类似)