08 September 2014
Sql Basics Invoice Kata
- Create a new database called ‘CompanyXInvoices’
- Add a new table called ‘Invoices’ which has a primary id and a invoice name
- Add a new table called ‘InvoiceItems’ which has a foreign key constraint to the invoice table and an invoice item name attribute
- Create an invoice called ‘Invoice1’
- Add a invoice item linked to Invoice1, the item is called ‘Misc Work’
- List the contents of both the Invoices and the Invoice Items tables
- Add an additional column to ‘InvoiceItems’ called cost which should represent money
- Do a query that show a single table with the following information on each line - invoice name, invoice item name, amount
- Delete the two tables
- Delete the database
blog comments powered by