Question: The id column for the log_clients table isn't an identity (auto-increment) column. Instead, it uses a natural key: the conversion of the dotted IP address
The "id" column for the "log_clients" table isn't an identity (auto-increment) column. Instead, it uses a natural key: the conversion of the dotted IP address to its numeric equivalent. The MySQL function INET_ATON can be used to remove the non-numeric characters from ip_client so the value can be inserted into log_clients.id. Use an INSERT-SELECT statement to populate your "log_clients" table. (Hint: populate log_clients.id as INET_ATON(ip_client) ). Be sure to populate both columns of the log_clients table with one SQL statement.
my attempt: insert into log_clients (id , client_ip) select log_clients.id as inet_aton,ip_client from log_all;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
