ClickHouse/tests/queries/0_stateless/02771_log_faminy_truncate_count.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
582 B
MySQL
Raw Normal View History

DROP TABLE IF EXISTS test_log;
CREATE TABLE test_log
(
`crypto_name` String,
`trade_date` Date
)
ENGINE = Log;
INSERT INTO test_log (crypto_name, trade_date) VALUES ('abc', '2021-01-01'), ('def', '2022-02-02');
TRUNCATE TABLE test_log;
SELECT count() FROM test_log;
DROP TABLE IF EXISTS test_log;
CREATE TABLE test_log
(
`crypto_name` String,
`trade_date` Date
)
ENGINE = StripeLog;
INSERT INTO test_log (crypto_name, trade_date) VALUES ('abc', '2021-01-01'), ('def', '2022-02-02');
TRUNCATE TABLE test_log;
SELECT count() FROM test_log;
DROP TABLE test_log;