SQL
Blueprint
Section titled “Blueprint”{ title: "SQL: create and drop database", variables: [{ key: "db", prompt: "Database name" }], structure: { files: [ { name: "create_{db.snake}.sql", content: [ "-- Create the database: {db.raw}", "CREATE DATABASE IF NOT EXISTS {db.snake};", "USE {db.snake};", ], }, { name: "drop_{db.snake}.sql", content: [ "-- Delete the database: {db.raw}", "DROP DATABASE IF EXISTS {db.snake};", ], }, ], },}Result
Section titled “Result”Enter online shop:
Directorydb
- create_online_shop.sql
- drop_online_shop.sql
-- Create the database: online shopCREATE DATABASE IF NOT EXISTS online_shop;USE online_shop;-- Delete the database: online shopDROP DATABASE IF EXISTS online_shop;