The document discusses how to create tables in SQL using the CREATE TABLE statement. It provides examples of creating simple tables, tables with constraints like primary keys, and relationship between multiple tables using foreign keys. It also discusses the various ALTER TABLE statements that can be used to modify existing tables by adding, dropping or changing columns.
13. Alter alter table STOCK add constraint FK_STOCK_PS_PRODUCTO foreign key (PRODUCTO_CODIGO references PRODUCTO (PRODUCTO_CODIGO); alter table STOCK add constraint FK_STOCK_SP_PROVEEDO foreign key (PROVEEDOR_CODIGO) references PROVEEDOR (PROVEEDOR_CODIGO);
14. Variaciones de Alter Borra Tabla: Drop table tabla Crea Tabla: Create table tabla(a char(10), b char(20)); Borra Columna: Alter table cliente drop column estado Cambia Columna: Alter table cliente modify (nombrecliente char(25)) Agrega Columna: Alter table cliente add (estado char(10));