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? |
☺ | How To Execute the Cursor Queries with "OPEN" Statements? |
☺ | How To Convert a Numeric Expression from One Data Type to Another? |
☺ | How To Use Subqueries with the EXISTS Operators in MS SQL Server? |
☺ | How To Find Out What Is the Default Collation in a Database? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |
☺ | Sybase Interview Questions. |