[sql] vyakhya

Viewer

  1. -- phpMyAdmin SQL Dump -- version 3.3.9 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 19, 2024 at 03:20 AM -- Server version: 5.5.8 -- PHP Version: 5.3.5 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!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 utf8 */; -- -- Database: `vyakhya` -- CREATE DATABASE `vyakhya` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `vyakhya`; -- -------------------------------------------------------- -- -- Table structure for table `company` -- CREATE TABLE IF NOT EXISTS `company`( `companyid` int(11) NOT NULL DEFAULT '0', `companyname` varchar(30) DEFAULT NULL, `city` varchar(20) DEFAULT NULL, PRIMARY KEY(`companyid`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `company` -- INSERT INTO `company` (`companyid`, `companyname`, `city`) VALUES (4013, 'UNION bank cooperation', 'FLORIDA'), (4452, 'LIC bank cooperation', 'GUJARAT'), (4578, 'small bank cooperation', 'delhi'), (4658, 'first bank cooperation', 'america'), (4962, 'HDFC bank cooperation', 'mumbai'); -- -------------------------------------------------------- -- -- Table structure for table `employee` -- CREATE TABLE IF NOT EXISTS `employee` ( `empID` int(11) NOT NULL DEFAULT '0', `ename` varchar(10) DEFAULT NULL, `street` int(11) DEFAULT NULL, `city` varchar(20) DEFAULT NULL, PRIMARY KEY (`empID`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `employee` -- INSERT INTO `employee` (`empID`, `ename`, `street`, `city`) VALUES (235, 'charlie', 45, 'brampton'), (356, 'olivia', 33, 'canada'), (789, 'diljit', 27, 'DELHI'), (798, 'kaka', 36, 'punjab'), (1234, 'taylor', 23, 'miami'), (1652, 'amrit', 54, 'amritsar'), (1698, 'billie', 67, 'vegas'), (1758, 'camilla', 19, 'alabama'), (1879, 'alan', 47, 'CALIFORNIA'), (1954, 'selena', 66, 'america'); -- -------------------------------------------------------- -- -- Table structure for table `hello` -- CREATE TABLE IF NOT EXISTS `hello` ( `empno` int(11) DEFAULT NULL, `ename` varchar(10) DEFAULT NULL, `job` varchar(10) DEFAULT NULL, `mgr` int(11) DEFAULT NULL, `hiredate` date DEFAULT NULL, `sal` int(11) DEFAULT NULL, `comm` double(10,3) DEFAULT NULL, `deptno` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `hello` -- INSERT INTO `hello` (`empno`, `ename`, `job`, `mgr`, `hiredate`, `sal`, `comm`, `deptno`) VALUES (4567, 'taylor', 'associate', 4568, '2004-03-24', 400, 0.000, 15), (1234, 'billie', 'associate', 4569, '2004-04-24', 500, 2.000, 12), (4578, 'charlie', 'manager', 2364, '2004-04-24', 600, 1.000, 13), (8243, 'shawn', 'manager', 3457, '2004-04-23', 700, 1.000, 13), (3243, 'olivia', 'associate', 6755, '2004-04-23', 800, 1.000, 12); -- -------------------------------------------------------- -- -- Table structure for table `manages` -- CREATE TABLE IF NOT EXISTS `manages` ( `employeeid` int(11) DEFAULT NULL, `managerid` int(11) DEFAULT NULL, KEY `employeeid` (`employeeid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `manages` -- INSERT INTO `manages` (`employeeid`, `managerid`) VALUES (1234, 1879), (1698, 1879), (1758, 1954), (235, 798), (1652, 798); -- -------------------------------------------------------- -- -- Table structure for table `works` -- CREATE TABLE IF NOT EXISTS `works` ( `employeeid` int(11) DEFAULT NULL, `companyid` int(11) DEFAULT NULL, `salary` float DEFAULT NULL, KEY `employeeid` (`employeeid`), KEY `companyid` (`companyid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `works` -- INSERT INTO `works` (`employeeid`, `companyid`, `salary`) VALUES (1234, 4658, 2000), (1698, 4962, 3000), (1758, 4962, 1500), (235, 4013, 2500), (1652, 4452, 3000); -- -- Constraints for dumped tables -- -- -- Constraints for table `manages` -- ALTER TABLE `manages` ADD CONSTRAINT `manages_ibfk_1` FOREIGN KEY (`employeeid`) REFERENCES `employee` (`empID`); -- -- Constraints for table `works` -- ALTER TABLE `works` ADD CONSTRAINT `works_ibfk_1` FOREIGN KEY (`employeeid`) REFERENCES `employee` (`empID`), ADD CONSTRAINT `works_ibfk_2` FOREIGN KEY (`companyid`) REFERENCES `company` (`companyid`); 

Editor

You can edit this paste and save as new:


File Description
  • vyakhya
  • Paste Code
  • 19 Apr-2024
  • 4.22 Kb
You can Share it: