How To Select All Columns of All Rows from a Table with a SELECT statement in MS SQL Server?
Submitted by: AdministratorThe simplest query statement is the one that selects all columns of all rows from a single table: "SELECT * FROM tableName". The (*) in the SELECT clause tells the query to return all columns. The missing WHERE clause tells the query to return all rows in specified table. The tutorial exercise below returns all columns and all rows from table "ggl_links":
<pre>
SELECT * FROM ggl_links
id url notes counts created
101 globalguideline.com NULL 0 2006-04-30
102 globalguideline.com/html NULL 0 2007-05-19
103 globalguideline.com/sql NULL NULL 2007-05-19
</pre>
Submitted by: Administrator
<pre>
SELECT * FROM ggl_links
id url notes counts created
101 globalguideline.com NULL 0 2006-04-30
102 globalguideline.com/html NULL 0 2007-05-19
103 globalguideline.com/sql NULL NULL 2007-05-19
</pre>
Submitted by: Administrator
Read Online MS SQL Server Job Interview Questions And Answers
Top MS SQL Server Questions
☺ | How To Start SQL Server Browser Service? |
☺ | What Happens If You Insert a Duplicate Key for the Primary Key Column in MS SQL Server? |
☺ | What Are Binary String Data Types in MS SQL Server? |
☺ | What Is a Subquery in a SELECT Query Statement in MS SQL Server? |
☺ | How To Create a View on an Existing Table in MS SQL Server? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |
☺ | Sybase Interview Questions. |