Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
code
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' select @@version as 'sql server version' create table Student( Fac_NO char(10) not null primary key, Name nvarchar(50) not null); create table Lectures( Lec_ID char(10) not null primary key, Name nvarchar(50) not null); create table Assessments( Fac_NO char(10) not null, Lec_ID int not null, constraint PK_Assessments primary key (Fac_NO,Lec_ID), constraint FK_Students foreign key(Fac_NO) references Student(Fac_NO), constraint FK_Lectures foreign key(Lec_ID) references Lectures(LEc_ID));
View schema
edit mode
|
history
|
discussion