How to restore database using SQL query in TSQL?

How to restore database using SQL query in TSQL?

If you have a database backup .bak file extension and want to restore it using SQL query. You can use the built-in 'RESTORE DATABASE' function. Remember in order to be able to restore a database successfully. You need to be a database owner which has the role of db_owner. You also need to ensure that there is no open session use the database.
How to set the dropdown selected value in Vue.Js?

How to set the dropdown selected value in Vue.Js?

In this tutorial, you will learn how to set the default value of a select combo box in VueJS. We are going to populate a dataset of a dropdown select by creating an array of objects. In this example, we going to populate a fruit object contains the property of an Id and Name.
VueJS Button Click Event

VueJS Button Click Event

We are going to create a really simple VueJS application to showcase a button click event handling in VueJS.
How to get all table sizes in TSQL?

How to get all table sizes in TSQL?

To get the information about how much space or size used by tables. You can retrieve the size information by linking multiple tables in sys tables. There are two tables that hold this information. The first one is the sys.partitions table. You can get the no of rows created of a table. The second will be the sys.allocation_units table which will return the information of used_pages info.
How to add a new column in TSQL?

How to add a new column in TSQL?

If you need to add a new column in TSQL. You need to use the keyword function 'ALTER TABLE'. It is recommended you perform a check if the proposed column you want to add is not already existed in the database table otherwise you will receive an error message.
How to generate new Guid in TSQL?

How to generate new Guid in TSQL?

GUID stands for Globally Unique Identifier. It is a universally unique id using a pseudo-random 128 bit number. GUIDs are mostly used to replace as another alternative or replacement of integer value. It is preferable to compare with numbers because it is unique across tables, databases, and servers. The drawback is it contains 4 times larger than the traditional 4-byte index value.
How to delete a stored procedure in TSQL?

How to delete a stored procedure in TSQL?

If you need to delete or drop a stored procedure in TSQL. You can use a built-in function called DROP. It is recommended that you perform a check to see if the stored procedure you want to delete does exist in the sysobjects table.
How to use ROW_NUMBER in TSQL?

How to use ROW_NUMBER in TSQL?

If you want to have a sequential number against a row in SQL Server record. You can use the number function called ROW_NUMBER.
How to delete all Functions in TSQL?

How to delete all Functions in TSQL?

To delete If you need to delete all non-system functions in TSQL. We need to look against the sysobjects and looking for the type value under 'FN', 'IF', 'TF', 'FS', and 'FT'.
How to create a table with uniqueidentifier in TSQL?

How to create a table with uniqueidentifier in TSQL?

A Guid is a 16-byte binary data type TSQL. This data type can be used as another alternative unique identifier for a record. Usually, we use numbers for the primary key. But on some occasions, if we want to make it harder for users to guess the primary key we can use this Guid type alternative. For example: If we have a user table with a primary key integer. If we want to do a query against it we can easily pass any integer number. But with Guid type, it will be a bit hard to guess. So this can be a good choice if you want to build a better application.
How to get inserted Guid in TSQL?

How to get inserted Guid in TSQL?

If you need to get the returned GUID uniqueidentifier after inserting a record. You cannot use the method  SCOPE_IDENTITY() to retrieve the value. What you can do is by creating a temporary table in TSQL as a variable table and then perform output to insert the column Guid into the table variable.
VueJS Template List Binding

VueJS Template List Binding

In this tutorial, we are going to learn how to populate the content using the VueJs template. We will use a for loop method to read the array of a product list and bind it to the UL LI HTML list.