How To Select Some Specific Columns from a Table in a Query in MS SQL Server?
Submitted by: AdministratorIf you want explicitly tell the query to return some specific columns, you can specify the column names in the SELECT clause. The following select statement returns only three columns, "id", "created" and "url" from the table "ggl_links":
<pre>
SELECT id, created, url FROM ggl_links
id created url
101 2006-04-30 www.globalguideline.com
102 2007-05-19 www.globalguideline.com/html
103 2007-05-19 www.globalguideline.com/sql
</pre>
Submitted by: Administrator
<pre>
SELECT id, created, url FROM ggl_links
id created url
101 2006-04-30 www.globalguideline.com
102 2007-05-19 www.globalguideline.com/html
103 2007-05-19 www.globalguideline.com/sql
</pre>
Submitted by: Administrator
Read Online MS SQL Server Job Interview Questions And Answers
Top MS SQL Server Questions
☺ | How To Select Some Specific Rows from a Table in MS SQL Server? |
☺ | PHP MSSQL - How To Display a Past Time in Days, Hours and Minutes? |
☺ | Does Index Slows Down INSERT Statements? |
☺ | How To Execute the Cursor Queries with "OPEN" Statements? |
☺ | What Happens If Strings Are Casted into Wrong Code Pages in MS SQL Server? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Sybase Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |