Support the ongoing development of Laravel.io →
Database

When creating a table ("quotations") in a migration I want to set the index start count...

DB::statement('DBCC CHECKIDENT (\'quotations\', RESEED, 6000);');

The above keep on giving an error "you have an error in your SQL syntax". What am I doing wrong?

Last updated 2 years ago.
0

http://stackoverflow.com/questions/6963363/mysql-dbcc-checkident-syntax-error

That command doesn't seem to exist in MySQL. See that thread on StackOverflow.

0
Solution

Here is how I do.

$statement = "ALTER TABLE quotations AUTO_INCREMENT = 1;";
DB::unprepared($statement);
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.