简体   繁体   中英

How to add constraints with a large amount of objects in SQL query?

I want to get output from a SQL query by adding

WHERE ID IN (
15325335122,
85962128962,
12354789522,
64125335125,
64523578945,
12354784589,
......
........)

This list contains over 9000 rows, I'm wondering if there's an easy way to add them in the where statement since I don't want to copy and paste and add comma one by one. I'm new to SQL, can someone help me? Thanks in advance.

I've figured out the solution by following this instruction

In excel, select the cell next the first cell next to the first item on the right, then enter =A1&","

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM