Create Static Block via SQL Queries in Magento2

Today I had to create a static block quickly via SQL queries because for some reason the grid in Content > Blocks didn’t work. First I created the static block itself.

Values for fields creation_time, update_time and is_active are not required because MySQL will add default values.

After that I created the relation between static block and the actual store.

In order to get the correct block_id you simply have to get block_id from the table cms_block.

In my case the block_id of my new static block was 32. That’s it.