Free tools Windows power users keep installed
One-click scans. No signup required.
To export SQL results safely, choose the format your recipient needs, use the export method for your database, and control how spreadsheet software interprets the file. CSV is portable text, not a workbook with preserved cell types or formatting; Excel can change identifiers, long numbers, and dates unless you import them deliberately.
Choose CSV or an Excel workbook
Use CSV when the recipient needs a portable, plain-text table for another tool or system. Use an Excel workbook when the recipient needs spreadsheet features such as multiple sheets or formatting, or when your database client provides direct workbook output. Confirm what the selected client actually exports: CSV does not preserve formulas, formatting, multiple sheets, or explicit cell types.
As an Amazon Associate I earn from qualifying purchases.
Before exporting, establish whether the output should include a header row, how NULL and empty values should be represented, what encoding to use, and whether the recipient expects a particular delimiter or date convention. These details matter especially when a file will be loaded back into a database or another system.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
How do I export SQL query results to CSV?
Export commands vary by database engine. Also distinguish a server-side file, written where the database server can access it, from a client-side file, written on the computer running the database client. The latter is usually what you want for a local download. Check the manual for your installed product and version before using a command.
#1 Best Overall
- Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
PostgreSQL: write a local CSV with psql
In psql, use the client-side copy meta-command to transfer a query result through the connection and write it to a path accessible to the client:
copy (SELECT id, code, created_at FROM public.example ORDER BY id) TO 'results.csv' WITH (FORMAT CSV, HEADER, ENCODING 'UTF8')
Replace the query and path with your own. This is a psql meta-command, not a SQL statement to send as-is through another client. The path is interpreted by the client operating system; adapt its quoting and path conventions accordingly. PostgreSQL’s server-side COPY ... TO 'filename', by contrast, writes to a path accessible to the server process and may require appropriate server permissions.
Rank #2
- Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
In CSV mode, PostgreSQL quotes fields that contain the delimiter, quote character, carriage return, or line feed. Its documented default distinguishes NULL from a non-NULL empty string: NULL is an unquoted empty field, while an empty string is quoted. If another application will reload the export, preserve or explicitly document the chosen NULL-marker settings so the distinction is not lost.
MySQL 8.0: server-side export with SELECT INTO OUTFILE
MySQL 8.0 documents SELECT ... INTO OUTFILE for writing query results with configurable field terminators, optional enclosure, escaping, and line terminators. This writes from the server’s perspective. The database server must be able to write to the destination, and server filesystem and security restrictions apply; the command does not automatically download a file to your workstation. Consult the MySQL 8.0 manual and check the rules for your installation before choosing a path or permissions.
Rank #3
- Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
If you want a desktop workflow instead, MySQL Workbench documents exporting SQL-editor result grids to formats including CSV and Excel XML. Available formats and steps depend on the installed Workbench version; use its matching documentation. Do not substitute PostgreSQL syntax for a MySQL export command, or assume their file-access rules are alike.
Other database engines and clients
For another engine, use its official export command or the export function in your installed client. Check whether it exports a query result or a whole table, where it writes the file, what permissions it needs, and how it handles delimiter, quoting, escaping, NULL, and encoding. Do not assume a command or output option exists across products or versions.
Rank #4
- Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Make the CSV structurally reliable
CSV is structured text, and the extension alone does not ensure correct quoting, encoding, or interpretation. A field containing a delimiter, quote, or line break needs to be quoted and escaped according to the export format. Prefer an exporter that handles these rules rather than assembling CSV by concatenating values in a query.
- Agree on the delimiter and quoting rules: the recipient must parse fields containing delimiters, quotes, or line breaks correctly.
- Set the encoding intentionally: for example, the PostgreSQL command above requests UTF-8. Confirm the recipient can read the chosen encoding.
- Decide how NULL differs from empty text: an export/import pair can conflate them or distinguish them depending on settings. Document the representation when round-tripping matters.
- Keep headers and column order predictable: select the needed columns explicitly and use stable names rather than relying on an unspecified column order.
Import CSV into Excel without changing values
Do not rely on double-clicking a CSV when columns contain identifiers or values that resemble numbers, dates, or scientific notation. Excel may remove leading zeros, convert long digit strings to scientific notation, retain only 15 digits of numeric precision, or interpret continuous letter-and-number strings as dates. These are documented Excel behaviors, not guarantees that every value will be changed.
Best Value
- [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
- 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
- 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
- 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
- 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.
- In Excel, choose Data > From Text/CSV and select the file.
- Choose Transform Data when you need to control column types before loading.
- Set identifier-like columns, such as product codes, account numbers, or ZIP codes, to Text. A code like
00123is an identifier, not a quantity; setting it to Text prevents Excel from treating it as a number and stripping its leading zeros. - Check the file encoding and the locale used to parse dates and numbers, then load the data.
- Compare representative rows with the database result. For sensitive extracts, also compare row counts and known identifiers or totals before sharing the workbook.
For an ambiguous date such as 03/04/2025, first establish whether the source means March 4 or April 3. Then choose the matching import locale and date type. Do not treat a successful load as proof that Excel interpreted every column as intended.
Respect Excel’s worksheet limits
Microsoft documents a maximum of 1,048,576 rows and 16,384 columns for Excel text import and export. The same row limit applies to what a worksheet can contain, so a larger SQL result cannot fit in a single worksheet. Power Query can handle data beyond worksheet fill capacity in some workflows, but it does not increase the worksheet’s capacity. For larger extracts, use a suitable database or data-processing destination, or intentionally split or transform the output rather than relying on one worksheet.
Choose an export method that fits the handoff
| Method | Where the file is written | What to check |
|---|---|---|
PostgreSQL psql copy |
Client computer | Client path and permissions; CSV options such as header, encoding, and NULL representation. |
PostgreSQL server-side COPY |
Server-accessible path | Server path and permissions; this is not automatically a local download. |
MySQL 8.0 SELECT ... INTO OUTFILE |
Server-side destination | Server filesystem and security constraints; field, enclosure, escape, and line-terminator options. |
| MySQL Workbench result-grid export | Client workflow; destination details depend on the installed version | Available CSV or Excel XML options and the behavior documented for that Workbench version. |
These methods are product- and version-specific. Whichever you use, validate the delivered file in the application or system that will consume it. For Excel, inspect sensitive types and locale parsing; for a system-to-system handoff, verify the agreed delimiter, quoting, encoding, column order, and NULL convention.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsQuick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




