sql >> Base de Datos >  >> RDS >> Sqlserver

Insertar declaración con subconsultas

Use esta Insertar syntax

INSERT INTO ADVNET.dbo.KenCatItemTest
            (CategoryItemId,ItemId,CategoryId)
SELECT Newid(),itemid,'0FCA508F-7EB5-4C2E-8803-DE688C4126E5'
FROM   janel.dbo.item
WHERE  janel.dbo.item.itemnumber LIKE 'c-%'
       AND listprice > 0