Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Definir o conjunto de alterações para inserir consulta no liquibase


Use o atributo valueComputed:
<changeSet author="unknown" id="insert-example-2">
    <insert tableName="StudentClassMap">
        <column name="studentId" valueComputed="(SELECT sId from StudentMaster where studentName='Jay Parikh')"/>
        <column name="studentClass" value="McSc. 1st Year"/>
    </insert>
</changeSet>