· 6 years ago · Aug 18, 2019, 10:34 PM
1create database analisis1;
2use analisis1;
3
4create table usuario(
5 id varchar(15) not null unique primary key,
6 paswd text not null,
7 email varchar(256) not null unique,
8 nombres text not null,
9 apellidos text not null,
10 creacion tIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP );
11
12drop table if exists proveedor;
13create table proveedor(
14 nombreComercial varchar(128) not null,
15 descripcion text not null,
16 id_usuario varchar(15) not null
17
18
19);
20
21
22alter table proveedor add constraint
23fk_usuario_proveedor foreign key (id_usuario) references usuario(id);