Is there a function like contents in mysql syntax?

Asked 2 years ago, Updated 2 years ago, 41 views

I'm implementing an alarm window.

Implement Table A as an alarm history table.

I implemented table B as a history exclusion table

If [Remove all alarms], except for the history existing in table B,

I want to put all the remaining history of table A into table B, but I don't know how to organize the query.

Is there a function like contents?

INSERT INTO B Table
          (History key
          ,  User key
          ,  Input date
          )
     SELECT A table history key (maybe we need a function like contents here..)
          , #{A table user key}
          , , NOW()
       FROM A TABLE;

mysql

2022-09-22 14:28

1 Answers

https://www.w3schools.com/sql/sql_exists.asp

You can use exists or not exists.


2022-09-22 14:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.