Sql server® 2012 t-sql fundamentals



Download 10,93 Mb.
Pdf ko'rish
bet423/443
Sana26.01.2022
Hajmi10,93 Mb.
#411755
1   ...   419   420   421   422   423   424   425   426   ...   443
Bog'liq
BookSQL

 

APPENDIX

 

Getting Started



 

 387

Sales.OrderDetails



PK,FK2

PK,FK1

unitprice

qty

discount

orderid

productid

Production.Products



PK

productname

supplierid

categoryid

unitprice

discontinued

productid

FK2

FK1

Production.Categories



PK

categoryname

description

categoryid

Stats.Scores



PK,FK1

PK

score

testid

studentid

Stats.Tests



PK testid

Production.Suppliers



PK

companyname

contactname

contacttitle

address

city

region


postalcode

country

phone

fax


supplierid

Sales.Orders



PK

custid


empid

orderdate

requireddate

shippeddate



shipperid

freight

shipname

shipaddress

shipcity

shipregion

shippostalcode

shipcountry

orderid

FK2


FK1

FK3

Sales.Customers



PK

companyname

contactname

contacttitle

address

city

region


postalcode

country

phone

fax


custid

dbo.Nums


PK n

Sales.Shippers



PK shipperid

companyname

phone

HR.Employees



PK

lastname

firstname

title

titleofcourtesy

birthdate

hiredate

address

city

region


postalcode

country

phone

mgrid


empid

FK1


Sales.OrderValues

orderid

custid


empid

shipperid

orderdate

requireddate

shippeddate

qty

val


Sales.EmpOrders

empid

ordermonth

qty

val


numorders

Sales.OrderTotalsByYear

orderyear

qty


Sales.CustOrders

custid


ordermonth

qty


FIGuRE A-11

  The data model of the TSQL2012 database.



Working with SQL Server Management Studio

SQL Server Management Studio (SSMS) is the client tool you use to develop and execute T-SQL code 

against SQL Server. The purpose of this section is not to provide a complete guide to working with 

SSMS, but rather just to help you get started.



To start working with SSMS

1. 

Start SSMS from the Microsoft SQL Server program group.



2. 

If this is the first time you have run SSMS, I recommend setting up the startup options so that 

the environment is set up the way you want it.

3. 

If a Connect To Server dialog box appears, click Cancel for now.

www.it-ebooks.info



388  

Microsoft SQL Server 2012 T-SQL Fundamentals



4. 

Choose the Tools | Options menu item to open the Options dialog box. Under Environment 

| Startup, set the At Startup option to Open Object Explorer And Query Window. This choice 

tells SSMS that whenever it starts, it should open the Object Explorer and a new query window.

The Object Explorer is the tool you use to manage SQL Server and graphically inspect ob-

ject definitions, and a query window is where you develop and execute T-SQL code against 

SQL Server. Feel free to navigate the tree to explore the options that you can set, but few 

of them are likely to mean much at this point. After you gain some experience with SSMS

you will find many of the options more meaningful and will probably want to change some 

of them.


5. 

When you’re done exploring the Options dialog box, click OK to confirm your choices. 



6. 

Close SSMS and start it again to verify that it actually opens the Object Explorer and a new 

query window. You should see the Connect To Server dialog box, as shown in Figure A-12.

FIGuRE A-12

  The Connect To Server dialog box.



7. 

  In this dialog box, you specify the details of the SQL Server instance you want to connect to.



7-1. 

Type the name of the server you want to connect to in the Server Name box.



7-2. 

If you’re connecting to an on-premises SQL Server instance, make sure Windows 

Authen tication is chosen in the Authentication box; if you’re connecting to SQL 

Data base, make sure that SQL Server Authentication is selected. Specify the logon 

and password information; click Options, and specify TSQL2012 in the Connect To 

Dataset box in the Connection Properties dialog box.

www.it-ebooks.info




Download 10,93 Mb.

Do'stlaringiz bilan baham:
1   ...   419   420   421   422   423   424   425   426   ...   443




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish