7 TA 0 EO ||5|| Limit to 1000 rows Q1 CREATE TABLE IF NOT EXISTS Owner ( ID int NOT NULL, FirstName varchar(255), LastNa

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

7 TA 0 EO ||5|| Limit to 1000 rows Q1 CREATE TABLE IF NOT EXISTS Owner ( ID int NOT NULL, FirstName varchar(255), LastNa

Post by answerhappygod »

7 Ta 0 Eo 5 Limit To 1000 Rows Q1 Create Table If Not Exists Owner Id Int Not Null Firstname Varchar 255 Lastna 1
7 Ta 0 Eo 5 Limit To 1000 Rows Q1 Create Table If Not Exists Owner Id Int Not Null Firstname Varchar 255 Lastna 1 (75.25 KiB) Viewed 32 times
7 TA 0 EO ||5|| Limit to 1000 rows Q1 CREATE TABLE IF NOT EXISTS Owner ( ID int NOT NULL, FirstName varchar(255), LastName varchar(255), Address varchar(255), 6 Phone int, 7 PRIMARY KEY (ID) 8 ); 9 10. INSERT INTO `Owner` (`ID`, `FirstName`, `LastName`, `Address`, `Phone`) VALUES 11 ('001', 'Carl', 'Greeves', '1236 4th', '9995723'), 12 ('002', 'Lucy', 'Mornning', '6666 6th', '5681235'), 13 14 ('003', 'Freddy', 'Fazbear', '5646 45th', '7456846'), ('004', 'Sam', 'Lionhearts', '4561 56th', '4668035'), ('005', 'Jaiden', 'Animat', '4654 25th', '4568406') 15 16 3 17 18. CREATE TABLE IF NOT EXISTS Pet( 19 PetID INT, 20 PetName varchar(255), 21 Owner ID int, 22 OwnerName varchar(225), 23 PetType varchar(255), 24 PetDescription varchar(255), 25 FOREIGN KEY (OwnerID) REFERENCES Owner (ID), 26 FOREIGN KEY (OwnerName) REFERENCES Owner (FirstName), 27 PRIMARY KEY (PetID) 28 ); 29 30 • INSERT INTO `Pet` (`PetID`, `PetName`, `Owner ID`, `OwnerName`, `PetType`, `PetDescription`) VALUES ('001'. 'Fluffy'.'001'.'Carl'.'Dog'. 'White Australian Shepherd'). 31 Output Action Output # Time Action Ⓡ x 20 03:53:47 CREATE TABLE IF NOT EXISTS Pet(PetID INT. PetName varchar(255), KEY OwnerlD' (ID), KEY Owner Name` ("First Name). Pet Type varchar(255), Pet Description v... 21 04:05:39 CREATE TABLE IF NOT EXISTS Pet(PetID INT. Pet Name varchar(255). OwnerID int, OwnerName varchar(225), Pet Type varchar(255), Pet Description varchar(255), F... 22 04:14:25 CREATE TABLE IF NOT EXISTS Owner (ID int NOT NULL, First Name varchar(255), Last Name varchar(255), Address varchar(255), Phone int, PRIMARY KEY (ID)) A 23 04:14:25 INSERT INTO 'Owner' ("ID", "First Name", "Last Name", "Address, Phone') VALUES (001", "Carl", "Greeves", "1236 4th', '9995723), (002", "Lucy", "Momning', '6666 6th", "5681... 24 04:14:25 CREATE TABLE IF NOT EXISTS Pet(PetID INT. PetName varchar(255), OwnerID int, OwnerName varchar(225), Pet Type varchar(255). Pet Description varchar(255), F. x < 1. 2 3 4 5 Message Error Code: 1072. Key column 'ID' doesn't exist in table Error Code: 1822. Failed to add the foreign key constraint. Missing index for constraint 'pet_ibfk_1' in the referenced table 'owner' 0 row(s) affected, 1 waming(s): 1050 Table 'owner' already exists 5 row(s) affected Records: 5 Duplicates: 0 Wamings: 0 Error Code: 1822. Failed to add the foreign key constraint. Missing index for constraint 'pet_ibfk_1' in the referenced table 'owner'
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply