0

This is my create table syntax:

Create table Recipe(
    Recipename varchar(30), 
    Cuisine varchar(20), 
    Skilllevel varchar(13), 
    Ingredients varchar(400), 
    Procedure varchar(1000), 
    Cookingtime int(30), 
    Category varchar(10), 
    Restrictions varchar(15)
); 

I'm not able to identify the error in this. Please do help. Thanks

2
  • 4
    Procedure is a reserved word. Need another name or surround it with backticks. Commented Jul 25, 2017 at 19:59
  • Sit down with any basic introductory book or tutorial. This is a long way from a sensible design. And what the hell is int(30)? Commented Jul 25, 2017 at 21:58

3 Answers 3

1

Procedure is a reserved word. Need another name or surround it with backticks.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much!
1

INT doesn't need a (30) value + you cant use word Procedure. Changed it to Procedures

 Create table Recipe(
         Recipename varchar(30), 
         Cuisine varchar(20), 
         Skilllevel varchar(13), 
         Ingredients varchar(400), 
         Procedures varchar(1000), 
         Cookingtime int, 
         Category varchar(10), 
         Restrictions varchar(15)); 

1 Comment

Thank you so much!
0

Looks like Isaiah answered your question but I wanted to add: depending on what kind of format you want the Cookingtime to be in, you could use the time datatype for long cook times (several hours) or keep using int if you are using minutes.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.