Adobe Lightroom classic plugin that export metadata as SQL script.
(specified Microsoft SQL Server)
It's standard Lightroom classic plugin Install. Please refer manuals.
Select photos you want to export metadata, then select menu from 'File -> Plug-in Extras -> SQLTable'
by default, SQL sctipt file 'SQLTable_photos.sql' is created in your home folder.