Turn records into SQL
The first row contains column headers and following rows contain values. Supports INSERT, UPDATE, DELETE, MERGE/UPSERT, SELECT, IN CONDITION, and column conversion.
DEVGRIZZLY / DB DEVELOPER TOOLS
This Google Sheets add-on by DevGrizzly generates SQL such as INSERT from data tables, and DDL, Java VO, and MyBatis code from table-definition sheets.
01 / OPEN
Open or refresh a spreadsheet while signed in to the Google account that installed DB Developer Tools.
From the top menu, choose “DB Developer Tools → Open tools.” In a Korean spreadsheet, the menu appears as “DB 개발자 도구 → 도구 열기.”
In the right sidebar, choose the language, mode (DATA or SCHEMA), DBMS, and operation.
Whenever you change the selected cells, click “Refresh range” and confirm the range summary at the top of the sidebar.
The first row contains column headers and following rows contain values. Supports INSERT, UPDATE, DELETE, MERGE/UPSERT, SELECT, IN CONDITION, and column conversion.
The first row contains schema headers such as COLUMN_NAME and DATA_TYPE; following rows define columns. Supports DDL, Java DTO/VO, MyBatis, and SQL CRUD.
02 / DATA MODE
DATA mode reads the visible table and converts each value to a DBMS-aware SQL literal. Quotes are escaped, blank cells become NULL, and native Sheets date cells become database-appropriate date expressions.
| USER_ID | USER_NM | AGE | ACTIVE_YN |
|---|---|---|---|
| U001 | Jane Kim | 30 | Y |
| U002 | Hong Gil-dong | (blank) | N |
Every header cell must be filled, and column names must be unique.
Use native number and date cells in Sheets when possible. Blank cells are handled as NULL.
For this example, select A1:D3. After changing the selection, click “Refresh range” in the sidebar.
INSERT INTO TB_USER (
USER_ID,
USER_NM,
AGE,
ACTIVE_YN
) VALUES
('U001', 'Jane Kim', 30, 'Y'),
('U002', 'Hong Gil-dong', NULL, 'N');“One row per statement” creates one INSERT for each record. Turning off “Include NULL columns” omits blank columns from that row. Oracle multi-row output uses INSERT ALL.
03 / SCHEMA MODE
SCHEMA mode reads column definitions rather than records. It recognizes each attribute from the first-row headers, so the canonical layout below is the most reliable.
COLUMN_NAMERequiredDatabase column name, for example USER_ID.
DATA_TYPERequiredDatabase type, for example VARCHAR, NUMBER(20,5), or TIMESTAMP.
LENGTHOptionalCharacter or binary length, for example 100.
PRECISIONOptionalTotal number of numeric digits, for example 20.
SCALEOptionalNumber of fractional digits, for example 5.
PKOptionalY for a primary-key column, otherwise N. Use Y on multiple rows for a composite key.
NULLABLEOptionalY to allow NULL; N for NOT NULL. Primary keys are automatically NOT NULL.
COMMENTOptionalColumn description used by COMMENT SQL and Java field comments.
Headers are case-insensitive. Aliases such as COLUMN_NAME/컬럼명, DATA_TYPE/데이터타입, and COMMENT/설명 are recognized. The canonical English headers above are recommended for shared sheets.
| COLUMN_NAME | DATA_TYPE | LENGTH | PRECISION | SCALE | PK | NULLABLE | COMMENT |
|---|---|---|---|---|---|---|---|
| USER_ID | VARCHAR | 30 | Y | N | User ID | ||
| USER_NM | VARCHAR | 100 | N | N | User name | ||
| AGE | INTEGER | N | Y | Age | |||
| CREATED_AT | TIMESTAMP | N | N | Created at |
Select A1:H5. You may put a size directly in DATA_TYPE, such as VARCHAR(30) or NUMBER(20,5), and leave LENGTH, PRECISION, and SCALE blank.
CREATE TABLE TB_USER (
USER_ID VARCHAR(30) NOT NULL,
USER_NM VARCHAR(100) NOT NULL,
AGE INTEGER,
CREATED_AT TIMESTAMP NOT NULL,
CONSTRAINT PK_TB_USER PRIMARY KEY (USER_ID)
);Generating the same definition for Oracle, PostgreSQL, MySQL, MariaDB, or Microsoft SQL Server maps types such as VARCHAR2/VARCHAR, NUMBER/NUMERIC/DECIMAL, and CLOB/TEXT for the target. Always review the result against your team’s type and constraint conventions before applying it.
04 / DEVELOPMENT CODE
Reuse the same SCHEMA table used for DDL. COLUMN_NAME becomes a camelCase Java field, and DATA_TYPE is mapped to Java and JDBC types for the selected DBMS.
CREATE TABLETable-creation DDL
COMMENT SQLTable and column comment SQL
FULL SQL CRUDDBMS-specific SELECT, INSERT, UPDATE, DELETE, and UPSERT SQL
MYBATIS FULL CRUDComplete resultMap and CRUD mapper XML
ALL GENERATEDDL, comments, Java, MyBatis, and SQL CRUD in one result
05 / TROUBLESHOOTING
Select a range, click “Refresh range,” and fill the fields required by the current operation, such as Table name, PK columns, or Class Name.
DATA mode requires the header row and at least one data row in the same selection.
Make sure both required headers are present in the first SCHEMA row. Spaces and underscores are accepted, but do not include duplicate aliases for the same field.
DATA UPDATE, DELETE, and UPSERT require actual header names in the PK columns field. SCHEMA MyBatis UPDATE, DELETE, and UPSERT require at least one row with PK set to Y.
An unsupported database type is safely mapped to Object and shown as a warning. Check the DBMS and DATA_TYPE, then adjust the Java type if needed.