Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Task_6_Final
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
--Sql Server 2014 Express Edition --Batches are separated by 'go' CREATE TABLE Customer( CustomerID int PRIMARY KEY, CompanyName varchar(255), ContactName varchar(255), ContactTitle varchar(255), Address varchar(255), City varchar(255), Region varchar(255), PostalCode int, Country varchar(50), Phone int, Fax int, DateJoined datetime, UpdatedAt datetime, DateLeft datetime ); CREATE TABLE Category( CategoryID int PRIMARY KEY, CategoryName varchar(100), Description varchar(255), Picture image, CreatedAt datetime, UpdatedAt datetime ); CREATE TABLE Product( ProductID int PRIMARY KEY, ProductName varchar(100), SupplierID int, CategoryID int FOREIGN KEY REFERENCES Category(CategoryID), QuantityPerUnit int, UnitPrice Money, UnitsInStock int, UnitsOnOrder int, ReorderLevel int, Discontinued bit, CreatedAt datetime, UpdatedAt datetime ); CREATE TABLE Orders( OrderID int PRIMARY KEY, CustomerID int FOREIGN KEY REFERENCES Customer(CustomerID), EmployeeID int, OrderDate datetime, RequiredDate datetime, ShipDate datetime, ShipVia int, Frieght Money, ShipName varchar(255), ShipAddress varchar(255), ShipCity varchar(100), ShipRegion varchar(50), ShipPostalCode int, ShipCountry varchar(255), CreatedAt datetime, UpdatedAt datetime ); CREATE TABLE OrderDetails( OrderID int FOREIGN KEY REFERENCES Orders(OrderID), ProductID int FOREIGN KEY REFERENCES Product(ProductID), UnitPrice Money, Quantity int, Discount Money, CreatedAt datetime, UpdatedAt datetime );
View schema
Execution time: 0,02 sec, rows selected: 0, rows affected: 0, absolute service time: 0,16 sec, absolute service time: 0,17 sec
edit mode
|
history
|
discussion