Run your first SQL statement

Create a project, add a database and run a statement in the Scratchpad.

In short

SQL Tester runs a stored procedure, function, view or plain SQL against a database your team owns and shows everything that came back. Save a run as a test and your team can re-run it and see when its result changes. Every run rolls back by default, and Production is always read-only.

Before you start

Run your first statement

  1. Open SQL Tester, press "New project" in the Projects rail, name it (for example Billing DB) and press "Create".
  2. The new project asks you to connect it: "Connect Billing DB to a database". Choose the Provider, paste the "Connection string" and press "Connect". "More options" names the environment and sets its Tier. To add more databases later, see Add an environment.
  3. Open the "Scratchpad" tab and choose the environment.
  4. Type the SQL. Its kind follows from what you type: one statement runs as a Query, several as a Script.
  5. The line under "Run" says the kind and the transaction, such as "Query. Rolled back after each run". Open it to choose another "Kind" - "Stored procedure", "Scalar function", "Table function" and "View" name an object under "Object name", such as dbo.GetInvoice, and a procedure or function takes parameters - or another "Transaction".
  6. Leave it on "Rolled back after each run" and press "Run". The result appears under it, and the run joins "Your recent runs".

The quick way Before you have a project, SQL Tester shows a Connect card. It creates the project and environment, then runs SELECT 1 AS answer so a first result is on screen before you type anything.

Find your way around

The Projects rail on the left holds your projects. When a project has environments, the header shows an environment picker with a colored tier dot: the Tests board and the Scratchpad run against it.

Share a project

  1. Open the project and press "Share" in its header, or press the Visible to line under its name.
  2. Under "Who can open it", choose Private, Team, Team and below, Everyone or Read-only for others, and the team it is filed under.
  3. Add a person, a team or a role at a level, with "Access until" if the share should end. Changes apply at once.

Good to know

If something goes wrong

Related