This is all about selecting data from database server using SQL command.
What is SQL
SQL (pronounced “ess-que-el”) stands for Structured Query Language. SQL is used to communicate with a database. According to ANSI (American National Standards Institute), it is the standard language for relational database management systems.
Microsoft SQL Server
Microsoft SQL Server is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which may run either on the same computer or on another computer across a network.
What is Microsoft SQL Server used for?
The core component of Microsoft SQL Server is the SQL Server Database Engine, which controls data storage, processing and security. It includes a relational engine that processes commands and queries and a storage engine that manages database files, tables, pages, indexes, data buffers and transactions.
Select All syntax;
In (*), it means all column in particular table
SELECT * FROM table_name;
In this part, column’s stated after SELECT statement will be the only colomn selected.
SELECT column1, column2, column2, ... FROM table_name;
Example: Select Statement
- if you want to select all column in particular table.
SELECT * FROM Customers;
- if you want to select only “FirstName, Lastname, Age, Gender”;
SELECT FirstName, Lastname, Age, Gender FROM Customers
In this blog, I will show how to create Table in MS SQL using T-SQL command. explain how its works and why we need to […]
In this blog, I will show how to use and where to use UNION in SQL. Explain How its work and why we need to use […]
In this blog, I will show step by step how to call a Web Service or Rest API in your T-SQL. explain how its works […]
A Common Table Expression also called CTE in short form, is a temporary named result set that you can reference within a SELECT, INSERT, UPDATE, […]