Files
IIabm/SQL_duplicate_without_exp_tables.sql

43 lines
1.3 KiB
SQL

-- SQL script to duplicate without_exp tables from iiabmdb20260127 to iiabmdb
-- This allows reusing previous experiment results as the baseline for new experiments
-- Drop existing tables if they exist (optional - comment out if you want to keep existing data)
DROP TABLE IF EXISTS iiabmdb.without_exp_result;
DROP TABLE IF EXISTS iiabmdb.without_exp_sample;
DROP TABLE IF EXISTS iiabmdb.without_exp_experiment;
-- Create and copy without_exp_experiment table
CREATE TABLE iiabmdb.without_exp_experiment LIKE iiabmdb20260127.without_exp_experiment;
INSERT INTO
iiabmdb.without_exp_experiment
SELECT *
FROM iiabmdb20260127.without_exp_experiment;
-- Create and copy without_exp_sample table
CREATE TABLE iiabmdb.without_exp_sample LIKE iiabmdb20260127.without_exp_sample;
INSERT INTO
iiabmdb.without_exp_sample
SELECT *
FROM iiabmdb20260127.without_exp_sample;
-- Create and copy without_exp_result table
CREATE TABLE iiabmdb.without_exp_result LIKE iiabmdb20260127.without_exp_result;
INSERT INTO
iiabmdb.without_exp_result
SELECT *
FROM iiabmdb20260127.without_exp_result;
-- Verify the copy
SELECT 'without_exp_experiment' as table_name, COUNT(*) as row_count
FROM iiabmdb.without_exp_experiment
UNION ALL
SELECT 'without_exp_sample', COUNT(*)
FROM iiabmdb.without_exp_sample
UNION ALL
SELECT 'without_exp_result', COUNT(*)
FROM iiabmdb.without_exp_result;