'employee_data_stored'라는 테이블에 저장된 생성 열을 생성하는 예를 통해 설명할 수 있습니다. 저장된 생성 열은 'stored' 키워드를 사용하여 생성할 수 있다는 것을 알고 있습니다.
예시
mysql> Create table employee_data_stored(ID INT AUTO_INCREMENT PRIMARY KEY, First_name VARCHAR(50) NOT NULL, Last_name VARCHAR(50) NOT NULL, FULL_NAME VARCHAR(90) GENERATED ALWAYS AS(CONCAT(First_name,' ',Last_name)) STORED); Query OK, 0 rows affected (0.52 sec) mysql> DESCRIBE employee_data_stored; +------------+-------------+------+-----+---------+------------------+ | Field | Type | Null | Key | Default | Extra | +------------+-------------+------+-----+---------+------------------+ | ID | int(11) | NO | PRI | NULL | auto_increment | | First_name | varchar(50) | NO | | NULL | | | Last_name | varchar(50) | NO | | NULL | | | FULL_NAME | varchar(90) | YES | | NULL | STORED GENERATED | +------------+-------------+------+-----+---------+------------------+ 4 rows in set (0.00 sec) mysql> INSERT INTO employee_data_stored(first_name, Last_name) values('Gaurav','Kumar'); Query OK, 1 row affected (0.04 sec) mysql> INSERT INTO employee_data_stored(first_name, Last_name) values('Raman','Singh'); Query OK, 1 row affected (0.09 sec) mysql> Select * from employee_data_stored; +----+------------+-----------+--------------+ | ID | First_name | Last_name | FULL_NAME | +----+------------+-----------+--------------+ | 1 | Gaurav | Kumar | Gaurav Kumar | | 2 | Raman | Singh | Raman Singh | +----+------------+-----------+--------------+ 2 rows in set (0.00 sec)