Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Chapter 11 Message Log example modification for MySQL users

 
Bartender
Posts: 1945
13
  • 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:
 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic