Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server 2012 how do I view data?

I have several tables in my database and I am using the SQL Server Management Studio for the first time. I want to see the data. In an SQLite 3 or MySQL

I'd simply type SELECT * FROM tblName WHERE...

the output would be in my console.

like image 896
Cocoa Dev Avatar asked Jul 09 '12 20:07

Cocoa Dev


People also ask

How do I view SQL Server results?

In the Options dialog box, expand Query Results, expand SQL Server and then select Results to Text tab as shown in the snippet below. In the right side panel first select the checkbox for Display results in a separate tab and then select the checkbox for Switch to results tab after the query executes and then click OK.

How do I view a record in SQL?

The syntax is: SELECT column1, column2 FROM table1, table2 WHERE column2='value'; In the above SQL statement: The SELECT clause specifies one or more columns to be retrieved; to specify multiple columns, use a comma and a space between column names.


1 Answers

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

You can use the mouse for all of the above (there is a toolbar button for new query window, and you can use the mouse for selecting the DB).

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

like image 147
Oded Avatar answered Nov 02 '22 16:11

Oded