Sql server® 2012 t-sql fundamentals


To create and populate the sample database in SQL database



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

To create and populate the sample database in SQL database

1. 

Double-click the file name in Windows Explorer to open the file in SSMS. The Connect To 

Database Engine dialog box appears.

2. 

In the Server Name box, ensure that the name of the SQL Database server you want to con-

nect to appears—for example, myserver.database.windows.net

3. 

In the Authentication box, make sure SQL Authentication is chosen and the correct logon 

name and password are entered. Click Options.

4. 

On the Connection Properties tab, type master in the Connect To Database text box, and 

then click Connect.

5. 

Skip the instructions under Section A in the script (for an on-premises SQL Server instance) 

and follow the instructions under Section B in the script (for SQL Database). The most impor-

tant instruction is the one telling you to run the following command to create the TSQL2012 

database.

CREATE DATABASE TSQL2012;



6. 

Right-click any empty area in the query pane and choose Connection | Change Connection. 

The Connect To Database Engine dialog box appears. Specify TSQL2012 as the database to 

connect to, and click Connect. You should see the TSQL2012 database in the Available Data-

bases box.

As an alternative, you can simply select the TSQL2012 database from the Available Data-

bases box.

7. 

  Highlight the code in Section C (beginning with Create Schemas and all the way to the end of 

the script file). Press F5 to run the script. When the execution is done, the Command(s) Com-

pleted Successfully message should appear in the Messages pane. Note that on slow connec-

tions it might take the code a few minutes to complete.

8. 

When you are done, you can close SSMS.

The data model of the TSQL2012 database is provided in Figure A-11 for your convenience.

www.it-ebooks.info





Download 10,93 Mb.

Do'stlaringiz bilan baham:
1   ...   418   419   420   421   422   423   424   425   ...   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