How do i use the top keyword in an insert statement?
Posted
by acidzombie24
on Stack Overflow
See other posts from Stack Overflow
or by acidzombie24
Published on 2010-05-21T18:43:58Z
Indexed on
2010/05/21
18:50 UTC
Read the original article
Hit count: 130
sql-server
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);
© Stack Overflow or respective owner