SQL Help please! 5.15 LAB - Insert rows into Horse table
The Horse table has the following columns:
ID - integer, auto increment, primary key
RegisteredName - variable-length string
Breed - variable-length string, must be one of the following: Egyptian Arab, Holsteiner, Quarter Horse, Paint, Saddlebred
Height - decimal number, must be between 10.0 and 20.0
BirthDate - date, must be on or after Jan 1, 2015
Insert the following data into the Horse table:
I keep getting this error:
ERROR 1064 (42000) at line 1:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Table :Horse Create table `Horse`( ID integer auto_increment primary key, Regis' at line 1
I have this written so far:
LAB ACTIVITY 5.15.1: LAB-Insert rows into Horse table
0/10
Main.sql
Load default template...
1. Table: Horse
2. Create table Horse(
3. ID integer auto_increment primary key,
4. RegisteredName varchar(15),
5. Breed varchar(150) check (Breed in ('Egyptian Arab', 'Holsteiner', 'Quarter Horse', 'Paint', 'Saddlebred'))
6. Height decimal(6,2) check (Height between 10.0 and 20.0),
7. BirthDate date check (BirthDate >= '2015-01-01'));
10. Insert into Horse (RegisteredName, Breed, Height, BirthDate) values
11. ('Babe', 'Quarter Horse', 15.3, '2015-02-10');
13. Insert into Horse (RegisteredName, Breed, Height, BirthDate) values
14. ('Independence', 'Holsteiner', 16.0, '2011-03-13');
15. Insert into Horse (RegisteredName, Breed, Height, BirthDate) values
16. ('Ellie', 'Saddlebred', 15.0, '2016-12-22');
17. Insert into Horse (RegisteredName, Breed, Height, BirthDate) values
18. (NULL, 'Egyptian Arab', 14.9, '2019-10-12');
19. Select * from Horse;
Develop mode
Submit mode
Explore the database and run your program as often as you'd like, before submitting for grading. Click Run program and observe the program's output in the second box.
Run program
Main.sql (Your program)
Output (shown below)
Program errors displayed here
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Table :Horse Create table `Horse`( ID integer auto_increment primary key, Regis' at line 1
Coding trail of your work
What is this?
7/4M-
min:1
Feedback?