Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

Showing posts with label SQL Server. Show all posts
Showing posts with label SQL Server. Show all posts

SQL Server Select Insert Update Delete in Single Stored Procedure (Query) with Example

Jul 19, 2015 10 comments
Introduction:

Here I will explain how to select, insert, update, delete in one stored procedure in
sql server 2008, 2010, 2012 or sql server query to insert, select(retrieve), edit, update, delete operations in single stored procedure with example or sql server insert, update, delete, select using single stored procedure with example.
Description:

SQL Server Difference between @@IDENTITY, SCOPE_IDENTITY () and IDENT_CURRENT

Jul 13, 2015 7 comments
Introduction:

Here I will explain difference between @@identity, scope_identity and ident_current in sql server with example. Generally @@identity, scope_identity and ident_current properties in sql server is used to get identity / id value of last or newly inserted record in table but only difference is scope either local or global and session either current session or other session in sql server.

Description:

Get Last (Newly) Inserted Record Id from SQL Server Table in Asp.net

Jun 24, 2015 1 comments
Introduction

Here I will explain how to get newly or last inserted record id from sql server database (table) in
asp.net using ado.net with c#, vb.net. By @@IDENTITY or SCOPE_IDENTITY() or IDENT_CURRENT we can get last or latest inserted record id from sql server table in asp.net using c#, vb.net.

Description:
  
In previous articles I explained SQL Server Query to get last inserted record id,
display gridview row details in popup window on hyperlink click in asp.net, jQuery show gridview row details in modal popup in asp.net, ajax modalpopupextender to edit gridview row details, gridview examples in asp.net and many articles relating to gridview, asp.net, c#,vb.net and jQuery. Now I will explain how to get last or latest inserted record id from database using ado.net with example in asp.net using c#, vb.net.

SQL Server Difference between DML, DDL, DCL and TCL Commands

Jun 6, 2015 1 comments
Introduction:

Here I will explain what is the difference between DDL, DML, DCL and TCL commands or statements in
sql server with examples. In sql server database operations like insert, update, delete, etc… categorized into multiple operations those are DDL, DML, DCL and TCL. In sql server DDL means data definition language, DML means data manipulation language, DCL means data control language and TCL means transactional control language.
Description:

SQL SERVER DML, DDL, DCL and TCL Commands Examples

0 comments
Introduction:

Here I will explain what is the difference between DDL, DML, DCL and TCL commands or statements in
sql server with examples. In sql server database operations like insert, update, delete, etc… categorized into multiple operations those are DDL, DML, DCL and TCL. In sql server DDL means data definition language, DML means data manipulation language, DCL means data control language and TCL means transactional control language.
Description:

SQL Server Add Hours (Minutes) to Current Date using DateAdd Function

1 comments
Introduction:

Here I will explain how to add hours to current date using DateAdd function in
sql server with example or adding hours or minutes to date in sql server. By using DateAdd function in sql server we can add hours or minutes to current date in sql server.
Description:

SQL Server Get Only Hours, Minutes, Date, Time from DateTime Field

Jun 3, 2015 0 comments
Introduction:

Here I will explain how to get only hours and minutes from datetime in
sql server or extract / get only time from datetime field in sql server or get hours datetime in sql server  or get only minutes from sql server or query to get only date / time / hours / minutes from sql server.
Description:

Find hierarchical data in SQL server (Recursion)

May 26, 2015 3 comments
Introduction:
Here I will show you how to find the hierarchical data of a sql server, like we did in Team management process. In a team process we have different users having their own parent. So if we want to go from level 1 to level n then what should we have to do? Lets come and check how to traverse all the users at all level from top to bottom and bottom to top.

Description:
Previously we have discussed about Generate Genealogy view in ASP.NET C# using Google Organizational Chart, here we have discussed about the hierarchical data. In this post we have just shown the data, but here we will use recursion to get the data. Let’s see how to do?

SQL Server Remove (Delete) Duplicate Records from Table using Query

Apr 22, 2015 2 comments
Introduction:

Here will explain how to remove duplicate records or rows from a table in SQL Server or delete duplicate records from table in SQL Server.

Description:

In previous articles I explained take database backup in sql server, covert rows to columns in sql server without using pivot tablesubstring function in SQL serverReplace function in SQL Serverhow to delete duplicate records from datatable in asp.net. Now I will explain how to delete duplicate records from a datatable in SQL server. 

During work with one application I got requirement like get the unique records from datatable in sql server. Actually our datatable does not contain any primary key column because of that it contains duplicate records that would be like this

Take Database Backup in SQL Server 2008 using Query or Management Studio

Apr 21, 2015 2 comments
Introduction:

Here I will explain how to write query to take database backup in
sql server or take backup of database using sql server management studio. To take database backup in sql server we need to write query like “BACKUP DATABASE DatabaseName to Disk…etc” or directly from management studio we can take backup  in sql server.
Description:                           
In previous articles I explained SQL injection attacks with example, SQL Server interview question and answers, joins in sql server, function example in sql server 2008, Primary key constraint in sql server, foreign key constraint in sql server, cursor example in sql server and many articles relating to SQL server. Now I will explain how to write query to take database backup or take database backup from sql server management studio 2008.

SQL Server Encryptbypassphrase and Decryptbypassphrase Functions with Example

Apr 20, 2015 2 comments
Introduction:

Here I will explain what is
 encryptbypassphrase and decryptbypassphrase functions in sql server. By using these functions we can encrypt or decrypt string or text or password column in sql server. EncryptByPassPhrase function in sql server will encrypt the data and store it in varbinary format and DecryptByPassphrase function will decrypt varbinary encrypted string and show the result in decrypted format.
Description:                           
In previous articles I explained SQL injection attacks with example, SQL Server interview question and answers, joins in sql server, function example in sql server 2008, Primary key constraint in sql server, foreign key constraint in sql server, cursor example in sql server and many articles relating to SQL server. Now I will explain use of encryptbypassphrase and decryptbypassphrase functions with example in sql server.

Encrypt and Decrypt String (Password) in SQL Server 2008

5 comments
Introduction:

Here I will explain how to do encryption and decryption of string or text or password in
sql server using encryptbypassphrase and decryptbypassphrase functions in sql server. EncryptByPassPhrase function in sql server will encrypt the data and store it in varbinary format and DecryptByPassphrase function will decrypt varbinary encrypted string and show the result in decrypted format.
Description:                           

SQL Server interview Questions and Answers for Experienced &Freshers

Apr 1, 2015 2 comments
Here I will explain sql server interview questions and answers for experienced and freshers or interview questions and answers in sql server for freshers and experienced people with examples.

Please check below of sql server interview questions and answers for experienced and freshers

What is SQL Injection and How do you Prevent it in Asp.net using C#, VB.NET

1 comments
Introduction:

Here I will explain what is sql injection attacks and how to prevent it in
asp.net website with example and how to prevent SQL injection attacks in asp.net using c#, vb.net with example. SQL injection means injecting some SQL commands in SQL statements to hack your data or delete data or change your data in tables via web page input.

Description:

In previous post I explained jQuery scroll to particular position of div when click on link, SQL Server remove duplicate records from table, SQL Server insert multiple rows with single insert statement,
how to send mail with attachment in asp.net and many more articles related to asp.net, SQL, c#, vb.net. Now I will explain what is sql injection attack in asp.net website with example.

What is Cursor in SQL Server with Example

2 comments
Introduction:

Here I will explain what is cursor in
sql server with example or simple cursor example in sql server and how to declare and use cursor in sql server. Cursor in sql server is used to retrieve set of data from table, loop through each record row by row, and modify the values based on requirements.
Description:
In previous articles I explained While loop example in sql server, nested while loop example in sql server, get only month and year from date in sql server, substring function in SQL server and many articles relating to SQL server. Now I will explain cursor in sql server with example.

To use cursor in sql server that syntax will be like as shown below
© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.