OM The Eternity
OM The Eternity

Reputation: 16244

If we export the table into another DB then does its all triggers also gets exported along with it?

If we export the table into another DB then does its all triggers also gets exported along with it?

Update

In context of Randy Minder's reply

is it possible to transfer the schema table from one DB to another?

UPDATE In context of MATT's Reply

But What should I do If i have to script this export? as in this case I have to change the trigger_Schmea every time.

Upvotes: 1

Views: 745

Answers (3)

Matt
Matt

Reputation: 44078

Pass --triggers to the mysqldump command if you're not getting triggers already (you should.. it's default)

Upvotes: 2

Randy Minder
Randy Minder

Reputation: 48522

Generally an "export" only deals with data. So the answer would be no. But if you script out your source database schema, and execute the script against the target database, all the triggers should come with it, assuming they were scripted as part of the schema.

Upvotes: 0

Riho
Riho

Reputation: 4595

I think not. You could try to export on table into .sql file and see what scripts are written into it.

Upvotes: 0

Related Questions