Is it possible to generate scripts but not for all tables ? I want to generate scripts in D:\Folder\.
Query
select *
from DatabaseA.dbo.TableA
where model = 'animal_b'
It is not possible to have SQL Server Mangement Studio script only some of the records in a table, based on a filter. When scripting data, it's all or nothing.
What you can do, is copy the records into a new table, by doing something like this:
select *
into DatabaseA.dbo.TableA_Copy
from DatabaseA.dbo.TableA
where model = 'animal_b'
And then simply script the data of TableA_Copy.
May be if you want to get limited data basing on where condition from your table then execute select statement then
RIGHT CLICK >> COPY with Headers and paste into Excel Sheets
>> Click on EXPORT IMPORT Wizard >>
>>Tick on Tab
>>Tick on Text
you will get the same format as shown in Sql Editor
Generate Scriptsoption of theSQL Server