Link to home
Create AccountLog in
Avatar of mikha
mikhaFlag for United States of America

asked on

sql workbench

I'm working with sql workbench and still figuring things out.

How to set up a , created and updated column , with datetime value and have created date automatically set , when row is created and update the updated column everytime the row updates.

also , how to set up a default value for a column

I am trying to do this using GUI of sql workbench .
Avatar of Nick Upson
Nick Upson
Flag of United Kingdom of Great Britain and Northern Ireland image

so workbench is the tool you are using to access what database (which makes all the difference), e.g.postfix. oracle. firebird, sqllite, .....
Avatar of mikha

ASKER

MySQL version 5.7
Are you referring to SQL Workbench/J or MySQL Workbench or other tool?

Note: you can do this from SQL syntax typically to set the initial default then you can use a Trigger on updates to update the column if your application doesn't send this automatically.
ASKER CERTIFIED SOLUTION
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account