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 Create a Large Table with Random Data for Index Testing in MS SQL Server? |
☺ | What Happens If NULL Values Are Involved in Bitwise Operations? |
☺ | How To Start SQL Server Browser Service? |
☺ | How To Execute the Cursor Queries with "OPEN" Statements? |
☺ | PHP MSSQL - How To Display a Past Time in Days, Hours and Minutes? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |
☺ | Sybase Interview Questions. |