CoderTools

SQL Test Data Generator

Support MySQL, PostgreSQL, SQL Server, Oracle, SQLite databases

Table Structure Input

Documentation

What is SQL Test Data Generator?

SQL Test Data Generator is a multi-database tool that automatically generates random test data from table structures. Supports MySQL, PostgreSQL, SQL Server, Oracle, and SQLite syntax. It parses DDL statements or JSON format table definitions, identifies primary keys, foreign keys and data types, then generates INSERT statements with database-specific syntax.

How to Use

  • 1. Enter table DDL statement or JSON format table structure
  • 2. Click "Parse Structure" button to analyze table structure
  • 3. Select target database type (MySQL/PostgreSQL/SQL Server/Oracle/SQLite)
  • 4. If there are foreign keys, configure available value sets
  • 5. Set row count, start ID and other options
  • 6. Click "Generate Data" button to generate INSERT statements
  • 7. Copy or download the generated SQL statements

Key Features

Support MySQL, PostgreSQL, SQL Server, Oracle, SQLite databases
Support parsing standard DDL CREATE TABLE statements
Support JSON format table structure definitions
Automatic handling of auto-increment primary keys
Support foreign key constraints with customizable value sets
Generate appropriate random values based on data types
Support processing multiple tables simultaneously

Related Terms

DDL (Data Definition Language): SQL statements used to define database structure, such as CREATE, ALTER, DROP, etc.

Primary Key: A column or set of columns that uniquely identifies each row in a table, duplicates and NULL values are not allowed.

Foreign Key: A column that references the primary key of another table, used to establish relationships between tables.

Auto Increment: Database automatically generates incrementing unique values for new rows.

Best Practices

  • 1. Define parent and child tables together - the tool automatically handles dependencies
  • 2. Parent table IDs are automatically passed to child tables for foreign key values
  • 3. For foreign keys referencing tables not in input, manually specify available values
  • 4. Check if generated data conforms to business rules
  • 5. Generate multiple times to get different random data

Related Tools