Skip to main content

Insert values in SQL table


Insert Values in SQL table

In this post, you will learn how to insert values in table by using INSERT Command.

INSERT command is used to insert values in Table of your database. By using INSERT statement you can easily add value in your table:

Syntax of INSERT statement:

INSERT INTO Table_Name
( Column1, Column2, Column3....) 
Values(values1, values2, values3 ....etc);

Here first you need to use INSERT INTO command and then you need to specify table name in which you want to add values.

Then you need to specify column name and then need to mentioned values based on datatype.

Now lets see an example: I'm going to insert value in EMP table

Emp_ID
Emp_Name
Emp_Age
Emp_Salay

Insert values in EMP table:

INSERT INTO EMP
(Emp_ID, Emp_Name, Emp_Age, Emp_Salary)
Values (1, 'Mohan', 25, 25000);


After executing this command, you will see result like:

Emp_ID
Emp_Name
Emp_Age
Emp_Salay
1
Mohan
25
25000

Note: By using INSERT command you can add values into table but if you want to change existing value in table, you can use UPDATE command.

Popular posts from this blog

How to analyze a JMeter summary report?

  A  Jmeter  Test Plan must have listener to showcase the result of performance test execution. Listeners capture the response coming back from Server while Jmeter runs and showcase in the form of – tree, tables, graphs and log files. It also allows you to save the result in a file for future reference. There are many types of listeners Jmeter provides. Some of them are: Summary Report, Aggregate Report, Aggregate Graph, View Results Tree, View Results in Table etc. Here is the detailed understanding of each parameter in Summary report. By referring to the figure: Label : It is the name/URL for the specific HTTP(s) Request. If you have selected “Include group name in label?” option then the name of the Thread Group is applied as the prefix to each label. Samples : This indicates the number of virtual users per request. Average : It is the average time taken by all the samples to execute specific label. In our case, the average time for Label 1 is 942 milliseconds & to...

What is Error, Bug and Defec ?

What is Error, Bug and Defect in software testing ? Error :- When developer compile a program and program compilation is failed due to some syntax problem or not used correct logic, is called an Error.  For example:-  public class  { public static void main( string []args) { s.o.p(" hello") } } Now after running this program, we will get an error because there is syntax issues as we haven't use correct syntax to print output. Bug : Bug is something that is not producing expected output or something is not behaving as expected.  For example- Developer develop a program to add two number and that program is running fine but producing wrong result. public class  { public static void main( string []args) { int a=3; int b=2; int s= ++a+b; System.out.println(" hello"); } } Actual output: 6 Expected outpit: 5 So here system is not producing expected output after adding two number. In simple term, whe...

How to write useful end-to-end tests with Cypress

  Visit YouTube Channel to watch more riting software of any complexity can often be a messy task, and this only gets worse when teams get larger and more people start to work on the same codebase. This problem is worsened in frontend development, where there are so many moving parts that writing unit and functional tests might not be enough to verify the application’s correctness. For example, you can’t really verify that a particular user flow doesn’t cause issues through a unit test. End-to-end testing  allows you to replicate user behavior on your application and verify that everything works as it should. If you’re writing production-grade web apps, writing e2e tests is a no-brainer. In this article, we’ll take a look at how to write useful e2e tests on the frontend using  Cypress . While there are other e2e testing tools like  Selenium  and  Nightwatch.js , we’ll focus on Cypress because of its suite of features, which include time traveling through yo...