---
title: "Bulk add unique data to an SQL Table in Apps Script"
author: "Phil Bainbridge"
date: 2020-02-03T19:38:07+00:00
modified: 2020-02-03T19:38:10+00:00
canonical_url: https://pulse.appsscript.info/p/2020/02/bulk-add-unique-data-to-an-sql-table-in-apps-script/
markdown_url: https://pulse.appsscript.info/p/2020/02/bulk-add-unique-data-to-an-sql-table-in-apps-script.md
categories:
  - "Sheets"
  - "Snippet"
tags:
  - "pbainbridge.co.uk"
description: "The following code combines Google Apps Script and SQL to bulk insert a Google Sheet of data into an existing SQL Table, but only after checking the record does not already exist so that it..."
---

# Bulk add unique data to an SQL Table in Apps Script

> The following code combines Google Apps Script and SQL to bulk insert a Google Sheet of data into an existing SQL Table, but only after checking the record does not already exist so that it can be safely re-run.

Source: *[The Gift of Script: Bulk add unique data to an SQL Table in Apps Script*](https://www.pbainbridge.co.uk/2020/01/bulk-add-unique-data-to-sql-table-in.html)

---

*Published by [Phil Bainbridge](https://pulse.appsscript.info/p/author/phillipbainbridge/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2020/02/bulk-add-unique-data-to-an-sql-table-in-apps-script/](https://pulse.appsscript.info/p/2020/02/bulk-add-unique-data-to-an-sql-table-in-apps-script/)*
