Last active
July 7, 2019 23:54
-
-
Save Y0lan/f2fa20dd9d82b0328d31986a1d4fbdc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE IF NOT EXISTS `users` ( | |
| `id` int NOT NULL AUTO_INCREMENT, | |
| `name` varchar(60) NOT NULL, | |
| `surname` varchar(60) NOT NULL, | |
| `email` varchar(60) NOT NULL, | |
| `phone` varchar(20) NOT NULL, | |
| PRIMARY KEY (`id`) | |
| ); | |
| CREATE TABLE IF NOT EXISTS `clients` ( | |
| `id` int NOT NULL, | |
| `name` varchar(60) NOT NULL, | |
| `surname` varchar(60) NOT NULL, | |
| `email` varchar(60) NOT NULL, | |
| `phone` varchar(20) NOT NULL, | |
| `age` int NOT NULL, | |
| `security_number` varchar(0) NOT NULL, | |
| `birthdate` date NOT NULL | |
| ); | |
| ALTER TABLE `clients` ADD CONSTRAINT `id` FOREIGN KEY () REFERENCES `users` (`id`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment