Tuesday, 20 January 2015

SELECT, INSERT, DELETE and UPDATE Queries in SQL SERVER

 SQL is a standard language for accessing and manipulating databases.

Now, We make a tutorial for sql Queries

  1. Create Demo database in SQL Server Management Studio.
  2. Create Test_tabl table in this database with 3 columns:
           [Id] [int] IDENTITY(1,1) NOT NULL,
[Name] [nvarchar](50) NULL,
[Phone] [nvarchar](50) NULL

Insert Query
INSERT INTO Test_tabl (ID, [Name], [Phone]) values(1, 'Manish', '9760737517')

Select Query
SELECT [Id] ,[Name] ,[phone] FROM [Demo ].[dbo].[Test_tabl]

Update Query

UPDATE [Demo].[dbo].[Test_tabl]
SET [Name] = 'Ajay'
,[phone] = '9719800859'

WHERE id=1


Delete Query



delete * from [Demo].[dbo].[Test_tabl] where id=1




I hope its help full for you.


No comments:

Post a Comment

Working with 3- Tier Architecture in C#

  Introduction In this article we will learn Use to 3- Tier architecture in C#.NET application. 3-Tier architecture is very famous and ...