Idb Lab 2
Idb Lab 2
Lab#2
Introduction to Microsoft SQL Server
Because Microsoft SQL Server works as a service to the operating system, in order to use
it, you must make sure its service has started. Sometimes you will have to start the service
and sometimes you will have to stop it. To check it, you can open the Control Panel and
the Administrative Tools. In the Administrative Tools window, open the Services.
Sometimes you will launch Microsoft SQL Server and try to connect but you may receive
an error message stating that the connection could not be established even though you
know that the username is correct. If that happens, check the service and start it.
a Interaction with login screen of MS SQL Server, putting your credentials to login and logging
in MS SQL Server
In order to do anything significant in Microsoft SQL Server, you will have to establish a
connection to it. If you start Microsoft SQL Server Management Studio from the Start
button, the Connect to Server dialog box would come up:
There are some object Explorer of MS SQL Server Management Studio .in these explorer
database, security and server object and some other element are include.
If we expand the database section there are some option which is related to the
database section. Those database are present in this section which we maked and
we can open.
First right click on the database option .after that click on the new database .after
that the new window will open on that window you will give name of your
database .
After making the database and providing the name of the database if you want to delete the
current database , so expend the database option and right click on your database
name .after that click on the delete option your database will delete.
After making the database next step is making of table. Expend your database and right
click on the table option and click on the create new
table. Your table will create.
Next is saving of table you must fill the field of the
table, after that you will able to save and delete the
table. Right Click top on the field and click on save.
After making the table next steps is making the field click on the fields and give the name
and select the data types.
Right click on that table which you want to add some data and select the edit top
200 row after that you will able to add data in table.
Introduction to SQL
SQL is a standard language for accessing and manipulating databases. SQL can
execute queries against a database
SQL can retrieve data from a database
SQL can insert records in a database
SQL can update records in a database
SQL can delete records from a database
SQL can create new databases
Introduction to Data Definition Language (DDL), Data Manipulation Language (DML) and Data
Query Language (DQL)
DDL
DDL is abbreviation of Data Definition Language. It is used to create and modify the
structure of database objects in database.
Examples: CREATE, ALTER, and DROP statements
DQL (Data Query Language) refers to the SELECT, SHOW and HELP statements
(queries)
SELECT is the main DQL instruction. It retrieves data you need. SHOW retrieves infos
about the metadata. HELP... is for people who need help.