Answer the question
In order to leave comments, you need to log in
Whether it is possible to make generated value of a field of sql request?
Does sql (or at least mysql > 5.4) allow to generate url field value? Something like that:
CREATE TABLE tbl (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
ext VARCHAR(255) NOT NULL,
url VARCHAR(255) NULL
);
INSERT INTO tbl (ext, url) VALUES ("jpg", CONCAT(id, ".", ext));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question