quarta-feira, 8 de dezembro de 2010

on
create database sistema
use sistema

create table aluno
(
cod_aluno int not null,
nome_aluno varchar(30) not null
constraint pk_aluno primary key (codigo)
)

create table curso
(
cod_curso int not null,
descricao_curso varchar (30)
constraint pk_curso primary key(cod_curso)
)

create table curso_aluno
(
cod_curso int not null,
cod_aluno int not null
constraint pk_ca primary key (cod_curso, cod_aluno),
constraint fk_curso foreign key (cod_curso) references curso(cod_curso),
constraint fk_aluno foreign key (cod_aluno) references aluno(cod_aluno)
)

0 comentários:

Postar um comentário

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.