SQL Server Manually Database Operations
Contents
In the previous post, I showed how to create a database with Microsoft SQL Server Management Studio and how to add tables to this database. Now I will explain with examples how to add data to the tables we have created and how to add or delete this data etc manually. If you are new to database, I recommend you to review Creating Microsoft SQL Server Database article.
First, let’s look at what is SQL.
What is SQL
It is a sub-language that allows you to access and manipulate the SQL database. It stands for Structured Query Language. SQL became a standard of ANSI in 1986 and ISO in 1987. Many database operations such as insert, update, delete, alter can be performed with SQL.
After briefly touching on its definition, we can now start the process. First, open the Management Studio and connect to the server.
Manually Data Entry
In the tree in the Object Explorer window, follow the path Databases -> [Your Database Name] -> Tables. Here you will see the tables you have created. Right-click on your table and click Edit Top 200 Rows.
Let’s enter data for this table now. As you can see, there are two columns named TagID and Tag in the table named Tags. TagID column is an int value primary key and automatically increases; Tag is a nvarchar type variable.
When entering data into such a table, the value of the primary key (Is Identity) is set to Yes, so we do not write anything in this column. We can write the tag we want on the tag column. Let’s enter some data.
Update Data Manually
As you can see, we entered our data manually without typing any SQL commands. If you want to change any data, you can change the value of the column and save it here. Very simple!
Manually Delete Data
If you want to delete a recorded data, it is possible to do this easily. Select the data you want to delete and press the Delete key on the keyboard and select Yes in the warning that appears. Or you can do the same by right clicking on the data and selecting the Delete option.
Conclusion
In this post, I showed you how to add data to our database table, update and delete it. I did not use SQL queries while doing these operations. I will mention these in my next articles. Goodbye.
Good