Saturday, December 21, 2019

[google-cloud-sql-discuss] Create table command setting Default value for column not working

Hi, 
We have set of tables developed earlier in onprem MySQL database. Now we are moving to Google SQL for production run. 
For example a sample table creation like follows onprem MySQL works perfect.
create table myschema.test (
valt int auto_increment primary key,
valkey varchar(50) default (replace(uuid(),''-'','''')),
valtree varchar(30)
)

However, when we connect to Google SQL instance and try to create same table, it shows error at the default. If we remove default for the column it works all ok.
Any idea how to fix this?

Thank you
Kiran

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/ded64fbc-e642-41b9-ad10-166a08a7a9ea%40googlegroups.com.

No comments:

Post a Comment