Error in changing table name into 'order' [closed]












-3















enter image description here



My question is about renaming table into 'order' as mentioned in photo.










share|improve this question















closed as unclear what you're asking by T.J. Crowder, Makyen, K.Dᴀᴠɪs, sideshowbarker, Tetsuya Yamamoto Nov 15 '18 at 1:20


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
















  • use orders instead

    – Ali Sheikhpour
    Nov 12 '18 at 16:04








  • 1





    Welcome to Stack Overflow! Please take the tour (you get a badge!), have a look around, and read through the help center, in particular How do I ask a good question? Post code and markup and such as text, not as a picture of text. Why: meta.stackoverflow.com/q/285551/157247

    – T.J. Crowder
    Nov 12 '18 at 16:10











  • If you insist on using reserved words you should read dev.mysql.com/doc/refman/5.5/en/keywords.html

    – P.Salmon
    Nov 12 '18 at 16:34






  • 1





    Please add code, errors and data as text (using code formatting), not images. Images: A) don't allow us to copy-&-paste the code/errors/data for testing; B) don't permit searching based on the code/error/data contents; and many more reasons. In general, code/errors/data in text format >>>> code/errors/data as an image >> nothing. Images should only be used, in addition to text in code format, if having the image adds something significant that is not conveyed by just the text code/error/data.

    – Makyen
    Nov 12 '18 at 16:56











  • Possible duplicate of Syntax error due to using a reserved word as a table or column name in MySQL

    – Makyen
    Nov 14 '18 at 22:13
















-3















enter image description here



My question is about renaming table into 'order' as mentioned in photo.










share|improve this question















closed as unclear what you're asking by T.J. Crowder, Makyen, K.Dᴀᴠɪs, sideshowbarker, Tetsuya Yamamoto Nov 15 '18 at 1:20


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
















  • use orders instead

    – Ali Sheikhpour
    Nov 12 '18 at 16:04








  • 1





    Welcome to Stack Overflow! Please take the tour (you get a badge!), have a look around, and read through the help center, in particular How do I ask a good question? Post code and markup and such as text, not as a picture of text. Why: meta.stackoverflow.com/q/285551/157247

    – T.J. Crowder
    Nov 12 '18 at 16:10











  • If you insist on using reserved words you should read dev.mysql.com/doc/refman/5.5/en/keywords.html

    – P.Salmon
    Nov 12 '18 at 16:34






  • 1





    Please add code, errors and data as text (using code formatting), not images. Images: A) don't allow us to copy-&-paste the code/errors/data for testing; B) don't permit searching based on the code/error/data contents; and many more reasons. In general, code/errors/data in text format >>>> code/errors/data as an image >> nothing. Images should only be used, in addition to text in code format, if having the image adds something significant that is not conveyed by just the text code/error/data.

    – Makyen
    Nov 12 '18 at 16:56











  • Possible duplicate of Syntax error due to using a reserved word as a table or column name in MySQL

    – Makyen
    Nov 14 '18 at 22:13














-3












-3








-3








enter image description here



My question is about renaming table into 'order' as mentioned in photo.










share|improve this question
















enter image description here



My question is about renaming table into 'order' as mentioned in photo.







mysql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 '18 at 17:01









Madhur Bhaiya

19.5k62236




19.5k62236










asked Nov 12 '18 at 15:59









Ramindu WalgamaRamindu Walgama

42




42




closed as unclear what you're asking by T.J. Crowder, Makyen, K.Dᴀᴠɪs, sideshowbarker, Tetsuya Yamamoto Nov 15 '18 at 1:20


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as unclear what you're asking by T.J. Crowder, Makyen, K.Dᴀᴠɪs, sideshowbarker, Tetsuya Yamamoto Nov 15 '18 at 1:20


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.















  • use orders instead

    – Ali Sheikhpour
    Nov 12 '18 at 16:04








  • 1





    Welcome to Stack Overflow! Please take the tour (you get a badge!), have a look around, and read through the help center, in particular How do I ask a good question? Post code and markup and such as text, not as a picture of text. Why: meta.stackoverflow.com/q/285551/157247

    – T.J. Crowder
    Nov 12 '18 at 16:10











  • If you insist on using reserved words you should read dev.mysql.com/doc/refman/5.5/en/keywords.html

    – P.Salmon
    Nov 12 '18 at 16:34






  • 1





    Please add code, errors and data as text (using code formatting), not images. Images: A) don't allow us to copy-&-paste the code/errors/data for testing; B) don't permit searching based on the code/error/data contents; and many more reasons. In general, code/errors/data in text format >>>> code/errors/data as an image >> nothing. Images should only be used, in addition to text in code format, if having the image adds something significant that is not conveyed by just the text code/error/data.

    – Makyen
    Nov 12 '18 at 16:56











  • Possible duplicate of Syntax error due to using a reserved word as a table or column name in MySQL

    – Makyen
    Nov 14 '18 at 22:13



















  • use orders instead

    – Ali Sheikhpour
    Nov 12 '18 at 16:04








  • 1





    Welcome to Stack Overflow! Please take the tour (you get a badge!), have a look around, and read through the help center, in particular How do I ask a good question? Post code and markup and such as text, not as a picture of text. Why: meta.stackoverflow.com/q/285551/157247

    – T.J. Crowder
    Nov 12 '18 at 16:10











  • If you insist on using reserved words you should read dev.mysql.com/doc/refman/5.5/en/keywords.html

    – P.Salmon
    Nov 12 '18 at 16:34






  • 1





    Please add code, errors and data as text (using code formatting), not images. Images: A) don't allow us to copy-&-paste the code/errors/data for testing; B) don't permit searching based on the code/error/data contents; and many more reasons. In general, code/errors/data in text format >>>> code/errors/data as an image >> nothing. Images should only be used, in addition to text in code format, if having the image adds something significant that is not conveyed by just the text code/error/data.

    – Makyen
    Nov 12 '18 at 16:56











  • Possible duplicate of Syntax error due to using a reserved word as a table or column name in MySQL

    – Makyen
    Nov 14 '18 at 22:13

















use orders instead

– Ali Sheikhpour
Nov 12 '18 at 16:04







use orders instead

– Ali Sheikhpour
Nov 12 '18 at 16:04






1




1





Welcome to Stack Overflow! Please take the tour (you get a badge!), have a look around, and read through the help center, in particular How do I ask a good question? Post code and markup and such as text, not as a picture of text. Why: meta.stackoverflow.com/q/285551/157247

– T.J. Crowder
Nov 12 '18 at 16:10





Welcome to Stack Overflow! Please take the tour (you get a badge!), have a look around, and read through the help center, in particular How do I ask a good question? Post code and markup and such as text, not as a picture of text. Why: meta.stackoverflow.com/q/285551/157247

– T.J. Crowder
Nov 12 '18 at 16:10













If you insist on using reserved words you should read dev.mysql.com/doc/refman/5.5/en/keywords.html

– P.Salmon
Nov 12 '18 at 16:34





If you insist on using reserved words you should read dev.mysql.com/doc/refman/5.5/en/keywords.html

– P.Salmon
Nov 12 '18 at 16:34




1




1





Please add code, errors and data as text (using code formatting), not images. Images: A) don't allow us to copy-&-paste the code/errors/data for testing; B) don't permit searching based on the code/error/data contents; and many more reasons. In general, code/errors/data in text format >>>> code/errors/data as an image >> nothing. Images should only be used, in addition to text in code format, if having the image adds something significant that is not conveyed by just the text code/error/data.

– Makyen
Nov 12 '18 at 16:56





Please add code, errors and data as text (using code formatting), not images. Images: A) don't allow us to copy-&-paste the code/errors/data for testing; B) don't permit searching based on the code/error/data contents; and many more reasons. In general, code/errors/data in text format >>>> code/errors/data as an image >> nothing. Images should only be used, in addition to text in code format, if having the image adds something significant that is not conveyed by just the text code/error/data.

– Makyen
Nov 12 '18 at 16:56













Possible duplicate of Syntax error due to using a reserved word as a table or column name in MySQL

– Makyen
Nov 14 '18 at 22:13





Possible duplicate of Syntax error due to using a reserved word as a table or column name in MySQL

– Makyen
Nov 14 '18 at 22:13












1 Answer
1






active

oldest

votes


















1














Don't do this. ORDER is a Reserved Keyword in MySQL.



You should seriously consider naming it to something else, eg: orders, or orderdata



Still, if you want to use order only, then you will have to use backticks around it, like below:



CREATE TABLE `order` (....


or (in your case):



RENAME TABLE ordering TO `order`


Check the complete list of Keywords and Reserved Keywords in MySQL here: https://dev.mysql.com/doc/refman/8.0/en/keywords.html






share|improve this answer


























  • RENAME TABLE (table_name) TO 'order' code is not working giving the same error

    – Ramindu Walgama
    Nov 12 '18 at 16:19













  • @RaminduWalgama dont use order as table name. Use something else.

    – Madhur Bhaiya
    Nov 12 '18 at 16:19











  • @RaminduWalgama check the updated answer. You are using single quotes. You need to use backticks. They look like this: `

    – Madhur Bhaiya
    Nov 12 '18 at 16:33


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Don't do this. ORDER is a Reserved Keyword in MySQL.



You should seriously consider naming it to something else, eg: orders, or orderdata



Still, if you want to use order only, then you will have to use backticks around it, like below:



CREATE TABLE `order` (....


or (in your case):



RENAME TABLE ordering TO `order`


Check the complete list of Keywords and Reserved Keywords in MySQL here: https://dev.mysql.com/doc/refman/8.0/en/keywords.html






share|improve this answer


























  • RENAME TABLE (table_name) TO 'order' code is not working giving the same error

    – Ramindu Walgama
    Nov 12 '18 at 16:19













  • @RaminduWalgama dont use order as table name. Use something else.

    – Madhur Bhaiya
    Nov 12 '18 at 16:19











  • @RaminduWalgama check the updated answer. You are using single quotes. You need to use backticks. They look like this: `

    – Madhur Bhaiya
    Nov 12 '18 at 16:33
















1














Don't do this. ORDER is a Reserved Keyword in MySQL.



You should seriously consider naming it to something else, eg: orders, or orderdata



Still, if you want to use order only, then you will have to use backticks around it, like below:



CREATE TABLE `order` (....


or (in your case):



RENAME TABLE ordering TO `order`


Check the complete list of Keywords and Reserved Keywords in MySQL here: https://dev.mysql.com/doc/refman/8.0/en/keywords.html






share|improve this answer


























  • RENAME TABLE (table_name) TO 'order' code is not working giving the same error

    – Ramindu Walgama
    Nov 12 '18 at 16:19













  • @RaminduWalgama dont use order as table name. Use something else.

    – Madhur Bhaiya
    Nov 12 '18 at 16:19











  • @RaminduWalgama check the updated answer. You are using single quotes. You need to use backticks. They look like this: `

    – Madhur Bhaiya
    Nov 12 '18 at 16:33














1












1








1







Don't do this. ORDER is a Reserved Keyword in MySQL.



You should seriously consider naming it to something else, eg: orders, or orderdata



Still, if you want to use order only, then you will have to use backticks around it, like below:



CREATE TABLE `order` (....


or (in your case):



RENAME TABLE ordering TO `order`


Check the complete list of Keywords and Reserved Keywords in MySQL here: https://dev.mysql.com/doc/refman/8.0/en/keywords.html






share|improve this answer















Don't do this. ORDER is a Reserved Keyword in MySQL.



You should seriously consider naming it to something else, eg: orders, or orderdata



Still, if you want to use order only, then you will have to use backticks around it, like below:



CREATE TABLE `order` (....


or (in your case):



RENAME TABLE ordering TO `order`


Check the complete list of Keywords and Reserved Keywords in MySQL here: https://dev.mysql.com/doc/refman/8.0/en/keywords.html







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 12 '18 at 16:33

























answered Nov 12 '18 at 16:02









Madhur BhaiyaMadhur Bhaiya

19.5k62236




19.5k62236













  • RENAME TABLE (table_name) TO 'order' code is not working giving the same error

    – Ramindu Walgama
    Nov 12 '18 at 16:19













  • @RaminduWalgama dont use order as table name. Use something else.

    – Madhur Bhaiya
    Nov 12 '18 at 16:19











  • @RaminduWalgama check the updated answer. You are using single quotes. You need to use backticks. They look like this: `

    – Madhur Bhaiya
    Nov 12 '18 at 16:33



















  • RENAME TABLE (table_name) TO 'order' code is not working giving the same error

    – Ramindu Walgama
    Nov 12 '18 at 16:19













  • @RaminduWalgama dont use order as table name. Use something else.

    – Madhur Bhaiya
    Nov 12 '18 at 16:19











  • @RaminduWalgama check the updated answer. You are using single quotes. You need to use backticks. They look like this: `

    – Madhur Bhaiya
    Nov 12 '18 at 16:33

















RENAME TABLE (table_name) TO 'order' code is not working giving the same error

– Ramindu Walgama
Nov 12 '18 at 16:19







RENAME TABLE (table_name) TO 'order' code is not working giving the same error

– Ramindu Walgama
Nov 12 '18 at 16:19















@RaminduWalgama dont use order as table name. Use something else.

– Madhur Bhaiya
Nov 12 '18 at 16:19





@RaminduWalgama dont use order as table name. Use something else.

– Madhur Bhaiya
Nov 12 '18 at 16:19













@RaminduWalgama check the updated answer. You are using single quotes. You need to use backticks. They look like this: `

– Madhur Bhaiya
Nov 12 '18 at 16:33





@RaminduWalgama check the updated answer. You are using single quotes. You need to use backticks. They look like this: `

– Madhur Bhaiya
Nov 12 '18 at 16:33



Popular posts from this blog

Full-time equivalent

さくらももこ

13 indicted, 8 arrested in Calif. drug cartel investigation