I have completely same defined 2 tables : t2 and t1.
t2 has 1000 rows and t1 is totally empty.
How can I SELECT top 500 rows from t2 and INSERT them to t1?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ll use “emptyTable” and “populatedTable” because the questions is confusing
Important
TOPwithout an ORDER BY gives 500 arbitrary rows. There is never an implied or natural order to a tableThe lack of column list here is usually defined as bad practice but works only if
Edit:
ORDER BY is required to guarantee row order. See these. It’s also in the ANSI standard