How do i use the top keyword in an insert statement?
- by acidzombie24
I was using it as LIMIT when i got the exception Incorrect syntax near the keyword 'TOP'.
Maybe i can omit it in this case without problem? but if i couldnt where do i put top?
INSERT INTO [user_data] (...) SELECT
...
@14 WHERE not exists (SELECT * FROM [user_data] WHERE [email] = @15 OR
[name] = @16 OR
[unconfirmed_email] = @17 TOP 1);