-
Notifications
You must be signed in to change notification settings - Fork 5
/
stock_mgn.sql
104 lines (85 loc) · 2.72 KB
/
stock_mgn.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
-- phpMyAdmin SQL Dump
-- version 4.2.7.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 16, 2017 at 03:35 PM
-- Server version: 5.6.20
-- PHP Version: 5.5.15
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 utf8 */;
--
-- Database: `stock_mgn`
--
-- --------------------------------------------------------
--
-- Table structure for table `stock`
--
CREATE TABLE IF NOT EXISTS `stock` (
`stock_id` int(7) NOT NULL,
`user_id` int(7) NOT NULL,
`date` date NOT NULL,
`exchange` varchar(10) NOT NULL,
`comp_name` varchar(60) NOT NULL,
`face_value` int(7) NOT NULL,
`num_shares` int(7) NOT NULL,
`price_bought` int(7) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
--
-- Dumping data for table `stock`
--
INSERT INTO `stock` (`stock_id`, `user_id`, `date`, `exchange`, `comp_name`, `face_value`, `num_shares`, `price_bought`) VALUES
(4, 5, '2017-12-14', 'NSE', 'LT|Larsen & Toubro Limited', 10, 100, 1000),
(5, 5, '2017-12-16', 'NSE', 'MARUTI|Maruti Suzuki India Limited', 10, 50, 200),
(6, 5, '2017-12-02', 'NSE', 'LT|Larsen & Toubro Limited', 10, 200, 1600);
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`user_id` int(11) NOT NULL,
`user_name` varchar(50) NOT NULL,
`user_email` varchar(50) NOT NULL,
`user_password` varchar(50) NOT NULL,
`user_age` int(11) NOT NULL,
`user_mobile` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`user_id`, `user_name`, `user_email`, `user_password`, `user_age`, `user_mobile`) VALUES
(5, 'user', 'user@gmail.com', 'ee11cbb19052e40b07aac0ca060c23ee', 21, 2147483647),
(6, 'test', 'test@gmail.com', '098f6bcd4621d373cade4e832627b4f6', 0, 0);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `stock`
--
ALTER TABLE `stock`
ADD PRIMARY KEY (`stock_id`);
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`user_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `stock`
--
ALTER TABLE `stock`
MODIFY `stock_id` int(7) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
/*!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 */;