e****e 发帖数: 1775 | 1 for example, i would like to generate insert and update statements for all
the tables in my db1 database. Need these scripts in other code.
Thanks.
Will do it in Toad. it's a vely basic & simple question.
any reply will be appreciated! |
c**t 发帖数: 2744 | 2 declare @sql varchar(1000)
set @sql='select * from TBALE'
execute @sql
for example, i would like to generate insert and update statements for all
the tables in my db1 database. Need these scripts in other code.
Thanks.
Will do it in Toad. it's a vely basic & simple question.
any reply will be appreciated!
【在 e****e 的大作中提到】 : for example, i would like to generate insert and update statements for all : the tables in my db1 database. Need these scripts in other code. : Thanks. : Will do it in Toad. it's a vely basic & simple question. : any reply will be appreciated!
|
e****e 发帖数: 1775 | 3 no.....
偶的意思是:
先举个例子:
select 'select count(*) from ' || table_name ||
';' || from user_tables;
结果偶就可以得到查所有表的记录数的sql语句
偶现在想要这样的一句来得到对所有表的insert语句
包含各个表的列名最好
产生的结果偶要在其他地方用
希望这回说明白了
谢谢
【在 c**t 的大作中提到】 : declare @sql varchar(1000) : set @sql='select * from TBALE' : execute @sql : : for example, i would like to generate insert and update statements for all : the tables in my db1 database. Need these scripts in other code. : Thanks. : Will do it in Toad. it's a vely basic & simple question. : any reply will be appreciated!
|