guid - generate mysql ids as a string instead of a integer -
i sure called don't know name of.
i want generate ids like:
59aa307e-94c8-47d1-aa50-aaa7500f5b54
instead of standard auto incremented number.
it doesn't have that, long unique string value it.
is there easy way this?
i want reference attachments not used, attachment=1
i know there ways around that, figure string based id better if possible, , im sure not searching right thing.
thank you
last time checked, can't specify uuid() default constraint column in mysql. means using trigger:
create trigger newid before insert on your_table_name each row set new.id = uuid()
i know there ways around that, figure string based id better
i understand you're after security obscurity, aware char/varchar columns larger 4 characters take more space int (1 byte). impact performance in retrieval , joins.
Comments
Post a Comment