drsqpko5286 2015-04-01 00:25 采纳率: 0%
浏览 36

too long

I am new to mysql, I have two table employee and audit

  1. employee Table have 4 columns

    1. id
    2. name
    3. sal
    4. role
  2. audit Table have 7 columns

    1. id
    2. type
    3. old_value
    4. new_value
    5. date
    6. username

Here , I want to insert 3 rows in audit table if someone add one row in employee table. To maintain the history

for eg: I made an entry in employee table

John | 20,000 | anaylst

Than my audit table will be

Type  | old_value |new_value | date        | username  
  name|           |John      | 01/04/2015  | dummy1
   sal|           |20,000    | 01/04/2015  | dummy1
 role |           |anaylst   | 01/04/2015  | dummy1

I am unable to insert rows in audit table.

  • 写回答

1条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作