Skip to content

Instantly share code, notes, and snippets.

@Rodrigo54
Created June 9, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rodrigo54/14d392809b7446cda143 to your computer and use it in GitHub Desktop.
Save Rodrigo54/14d392809b7446cda143 to your computer and use it in GitHub Desktop.
-- phpMyAdmin SQL Dump
-- version 4.4.9
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 09-Jun-2015 às 15:46
-- Versão do servidor: 5.6.16
-- PHP Version: 5.5.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `aula_2`
--
-- --------------------------------------------------------
--
-- Estrutura da tabela `venda`
--
CREATE TABLE IF NOT EXISTS `venda` (
`codigoP` int(11) DEFAULT NULL,
`codigoC` int(11) DEFAULT NULL,
`dataV` date DEFAULT NULL,
`quantidadeV` float DEFAULT NULL,
`valorV` int(20) DEFAULT NULL,
`dataRecebim` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Extraindo dados da tabela `venda`
--
INSERT INTO `venda` (`codigoP`, `codigoC`, `dataV`, `quantidadeV`, `valorV`, `dataRecebim`) VALUES
(5, 1, '1999-07-04', 50, 45000, '1999-07-04'),
(5, 2, NULL, 5.6, 1000, NULL),
(6, 2, '1999-05-04', 100, 60000, NULL),
(6, 1, NULL, 450, 90000, NULL);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `venda`
--
ALTER TABLE `venda`
ADD KEY `codigoP` (`codigoP`),
ADD KEY `codigoC` (`codigoC`);
--
-- Constraints for dumped tables
--
--
-- Limitadores para a tabela `venda`
--
ALTER TABLE `venda`
ADD CONSTRAINT `venda_ibfk_1` FOREIGN KEY (`codigoP`) REFERENCES `produto` (`codigoP`),
ADD CONSTRAINT `venda_ibfk_2` FOREIGN KEY (`codigoC`) REFERENCES `comprador` (`codigoC`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment