SQL Server 2012 how to view data?

I have several tables in my database, and this is the first time I'm using SQL Server Management Studio. I want to see the data. In SQLite 3 or MySQL

I would just type SELECT * FROM tblName WHERE...

the output will be in my console.

+4
source share
3 answers

In SSMS, open a new query window ( Ctrl + n ), make sure the database is selected from the drop-down list of databases ( Ctrl + d to focus on the list, then up / down arrows and Enter to select the database), write down the query and F5 for start.

You can use the mouse for all of the above (there is a button on the toolbar for the new query window, and you can use the mouse to select the database).

An alternative is to use the object browser to drill down on the database and table, right-click on the table name and select the option "Select top 1000 rows ..." (or similar).

+6
source

In SSMS, click the "new request" button, which should be right in the "view file ..." menu. You will get a blank window where you can enter SQL, with the results displayed below.

You will also get an additional toolbar to select the default table, unless you run the use yourdb; as the first operation in the query window.

+4
source

A couple of ideas:

With SSMS:

  • Connect to server> database> tables> Right-click and select top 1000.
  • Click New Query and enter SELECT * FROM TABLE
  • Use osql or sqlcmd
+1
source

All Articles