SQL Test Data Generator
Support MySQL, PostgreSQL, SQL Server, Oracle, SQLite databases
Table Structure Input
Tables Detected
Configuration
Foreign Key Configuration
Specify available values for foreign key fields (comma separated). If left empty for tables defined in the input, foreign key values will be automatically populated from generated parent table IDs.
Generated SQL Statements
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
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
SQL Formatter
Online SQL code beautifier and formatter with support for multiple database dialects
MyBatis Generator
Generate MyBatis configuration files from table structure, including XML Mapper, Entity and Mapper interface
CSV to SQL Generator
Convert CSV data to SQL CREATE TABLE and INSERT statements for multiple databases
Schema to SQL DDL Generator
Convert CSV/JSON data to SQL DDL CREATE TABLE statements with MySQL, PostgreSQL support and auto data type inference
UUID/GUID Generator
Generate unique identifiers (UUID/GUID) with customizable formats
Test Data Generator
Generate realistic test data including names, emails, phones, addresses. Supports 12 locales and multiple output formats