문제

In Powershell, I have a simple Mysql insert command.

$query = "INSERT INTO TABLE1 (id, col1, col2) VALUES (1, 'two', 'three');"<br>
$command = New-Object MySql.Data.MySqlClient.MySqlCommand($query, $connection)
$command.ExecuteNonQuery()

I'm using Mysql Connector Net 6.2.4.

Is it possible to return the last_insert_id() or something similar?

I've looked here for some info but can't really find anything.

Any thoughts?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top