• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Chapter 11 Message Log example modification for MySQL users  RSS feed

 
Ranch Hand
Posts: 1732
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, for MySQL users, in chapter 11's message log example,
the create message_log table command provided by the book is:


CREATE TABLE MESSAGE_LOG (ID INTEGER  NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
                         MESSAGE VARCHAR(255), LOG_DTTM TIMESTAMP, PRIMARY KEY (ID));



MySQL cannot compile "generated always as identity.
It should be modified  as:


CREATE TABLE MESSAGE_LOG (ID INTEGER  NOT NULL auto_increment, MESSAGE VARCHAR(255), LOG_DTTM TIMESTAMP, PRIMARY KEY (ID));



Also, in the LoggerBean.java, the INSERT_SQL provided by the book is:


MySQL cannot compile CURRENT TIMESTAMP, it should be modified as:
 
incandescent light gives off an efficient form of heat. You must be THIS smart to ride this ride. Tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!