diff --git a/exercises/practice/hello-world/.meta/example.sql b/exercises/practice/hello-world/.meta/example.sql index 505c8e81..d77af4e9 100644 --- a/exercises/practice/hello-world/.meta/example.sql +++ b/exercises/practice/hello-world/.meta/example.sql @@ -1,4 +1 @@ -INSERT INTO - hello_world (greeting) -VALUES - ('Hello, World!'); +SELECT "Hello, World!"; diff --git a/exercises/practice/hello-world/create_fixture.sql b/exercises/practice/hello-world/create_fixture.sql index a936bcf0..e69de29b 100644 --- a/exercises/practice/hello-world/create_fixture.sql +++ b/exercises/practice/hello-world/create_fixture.sql @@ -1,3 +0,0 @@ -DROP TABLE IF EXISTS hello_world; - -CREATE TABLE hello_world (greeting TEXT); diff --git a/exercises/practice/hello-world/hello-world.sql b/exercises/practice/hello-world/hello-world.sql index 610302fc..4ea08df0 100644 --- a/exercises/practice/hello-world/hello-world.sql +++ b/exercises/practice/hello-world/hello-world.sql @@ -1,4 +1 @@ -INSERT INTO - hello_world (greeting) -VALUES - ('Goodbye, Mars!'); +SELECT "Goodbye, Mars!"; diff --git a/exercises/practice/hello-world/hello-world_test.sql b/exercises/practice/hello-world/hello-world_test.sql index 23d06815..b44c1335 100644 --- a/exercises/practice/hello-world/hello-world_test.sql +++ b/exercises/practice/hello-world/hello-world_test.sql @@ -10,6 +10,15 @@ VALUES 'Hello, World!' ); +.mode csv +.output user_output.csv +.read hello-world.sql +.output + +DROP TABLE IF EXISTS hello_world; +CREATE TABLE hello_world (greeting TEXT); +.import user_output.csv hello_world + -- Comparison of user input and the tests updates the status for each test: UPDATE tests SET diff --git a/exercises/practice/hello-world/test_setup.sql b/exercises/practice/hello-world/test_setup.sql index 726b404d..921fab7e 100644 --- a/exercises/practice/hello-world/test_setup.sql +++ b/exercises/practice/hello-world/test_setup.sql @@ -1,7 +1,7 @@ -- Create database: .read ./create_fixture.sql -- Read user student solution and save any output as markdown in user_output.md: -.mode markdown +.mode list .output user_output.md .read ./hello-world.sql .output