From the course: Database Foundations: Intro to Databases

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Saving and using SQL scripts

Saving and using SQL scripts

From the course: Database Foundations: Intro to Databases

Start my 1-month free trial

Saving and using SQL scripts

- [Instructor] I have the commands that we ended the last movie on still here in a query tab. And when we attempt to close the tab, as your data studio prompts us to save the file. So far I've been selecting the option Do Not Save since the commands that we've been working with weren't terribly long and could easily be rewritten if needed. But what happens when you ask for the file to be saved instead? Let's press the Save button and find out. That prompts me to save the file with a dot SQL extension. Let's go ahead and just drop it onto our desktop and I'll call it "UpdateDelete" I'll press the Save file, and the text of that query is now saved onto my desktop. This allows you to save your structured query language scripts, so that you can easily rerun the commands again later. To retrieve the file, just go up to the File menu and come down to Open file. Then we'll browse out to the desktop and we'll find the SQL…

Contents