Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
-- Create the clients table (if not already created) CREATE TABLE clientInformation ( client_id INT AUTO_INCREMENT PRIMARY KEY, client_name VARCHAR(255) NOT NULL, contact_email VARCHAR(255) UNIQUE ); -- Insert clients into the table INSERT INTO clientInformation (client_name, contact_email) VALUES ('Alice Imports Co.', 'alice@example.com'), ('Beijing Artisans Ltd.', 'info@beijingart.com'), ('Tokyo Tech Supplies', 'sales@tokyotech.jp'), ('Ayurveda Traders', 'contact@ayurveda.in'), ('Paris Luxury Goods', 'parislux@example.fr'); -- Create the import declaration table CREATE TABLE importDeclaration ( declaration_id INT AUTO_INCREMENT PRIMARY KEY, client_id INT NOT NULL, product_name VARCHAR(255) NOT NULL, quantity INT NOT NULL, import_date DATE NOT NULL, country VARCHAR(100) NOT NULL, FOREIGN KEY (client_id) REFERENCES clientInformation(client_id) );

Stuck with a problem? Got Error? Ask AI support!

Copy Clear