First Lecture - Installation
First Lecture - Installation
1. SQL Server Developer edition lets developers build any kind of application on top
of SQL Server.
2. It includes all the functionality of Enterprise edition, but is licensed for use as a
development and test system, not as a production server.
3. SQL Server Developer is an ideal choice for people who build and test applications.
SQL Server developer edition:-
SQL Server Express: It is for small scale applications and free to use.
5) DBMS uses file system to store in RDBMS, data values are stored in the
data, so there will be no form of tables, so
relation between the tables. a relationship between these data
values will be stored in the form of a table
as well.
SQL Server Management Studio (SSMS) is the main interface tool for SQL
Server, and it supports both 32-bit and 64-bit environments.
Primary instances
Named instances.
There are two ways through which we may access the primary instance. First,
we can use the server name. Secondly, we can use its IP address. Named
instances are accessed by appending a backslash and instance name.
For example, to connect to an instance named xyx on the local server, you
should use 127.0.0.1\xyz. From SQL Server 2005 and above, you are allowed
to run up to 50 instances simultaneously on a server.
Choose the basic version by clicking on the 'Basic' option, as it has all
default configuration required to learn MS SQL.
"."
"localhost"
"127.0.0.1"
"Machine\Instance"
What is Database?
A database is a systematic collection of data. They support electronic storage
and manipulation of data. Databases make data management easy.
This unofficial build chart lists all of the known Service Packs (SP), Cumulative Updates (CU), patches,
hotfixes and other builds of MS SQL Server 2019, 2017, 2016, 2014, 2012, 2008 R2, 2008, 2005, 2000,
7.0, 6.5 and 6.0 that have been released.
Tried with microsoft sql server 2012 with windows 7.
In a table, each row represents a unique record and each column represents a
field in the record. For example, the customers table contains customer data
such as customer identification number, first name, last name, phone, email,
and address information as shown below:
SQL Server uses schemas to logically groups tables and other database objects. In our sample
database, we have two schemas: sales and production. The sales schema groups all the sales
related tables while the production schema groups all the production related tables.
To query data from a table, you use the SELECT statement. The following illustrates the most
basic form of the SELECT statement:
SELECT
select_list
FROM
schema_name.table_name;
Code language: SQL (Structured Query Language) (sql)
In this syntax:
First, specify a list of comma-separated columns from which you want to query data
in the SELECT clause.
Second, specify the source table and its schema name on the FROM clause.
When processing the SELECT statement, SQL Server processes the FROM clause first and then
the SELECT clause even though the SELECT clause appears first in the query.
SELECT
first_name,
last_name
FROM
sales.customers;
Code language: SQL (Structured Query Language) (sql)
Here is the result:
The result of a query is called a result set.
The following statement returns the first names, last names, and emails of all customers:
SELECT
first_name,
last_name,
email
FROM
sales.customers;
Code language: SQL (Structured Query Language) (sql)
1. First, SELECT * often retrieves more data than your application needs to function. It causes
unnecessary data to transfer from the SQL Server to the client application, taking more time for data
to travel across the network and slowing down the application.
2. Second, if the table is added one or more new columns, theSELECT * just retrieves all columns that
include the newly added columns which were not intended for use in the application. This could
make the application crash.
When the WHERE clause is available, SQL Server processes the clauses of the query in the
following sequence: FROM, WHERE, and SELECT.
To sort the result set based on one or more columns, you use the ORDER BY clause as shown in
the following example:
SELECT
*
FROM
sales.customers
WHERE
state = 'CA'
ORDER BY
first_name;
Code language: SQL (Structured Query Language) (sql)
In this example, the ORDER BY clause sorts the customers by their first names in ascending order.
In this case, SQL Server processes the clauses of the query in the following
sequence: FROM, WHERE, SELECT, and ORDER BY.
In this case, SQL Server processes the clauses in the following sequence: FROM, WHERE, GROUP
BY, SELECT, and ORDER BY.
Notice that the WHERE clause filters rows while the HAVING clause filter groups.
In this tutorial, you have learned how to use the SQL Server SELECT statement to query data
from a single table.