Beginner's question: I am learning SQL and the book says 'SQL queries can be created as an SQL script which can be saved as a plain text file with a .sql
file extension.' presumably this is done in Notepad but how do I save it as a .sql
script please?
Click Query, and then click Results to File. Enter and then execute the SQL statement. In the Save Results dialog box, specify the following settings: Save In: Select a directory in which to save the file.
Create a script file To create a simple Transact-SQL script file by using Notepad, follow these steps: Click Start, point to All Programs, point to Accessories, and then click Notepad. Save the file as myScript. sql in the C drive.
To save a query: Use the Save command in the application toolbar. In the Save File As window, choose a name and a location to save your query.
To save a file as sql file in notepad - save the file as "yourFile.sql" as in the below picture.
Make sure to select "All Types ." instead of "Normal text file (*.txt)"! Else it will be saved as script.sql.txt.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With