MySQL insert operation

MySQL insert operation :

When you need to write any data in a table you have to wite insert query in mysql.

Syntax :

insert into <table_name> (<column_name1>, <column_name2>....) values(<value1>, <value2>,......);

Example :

insert into employee(id, name, salary) values('101', 'Pradeep', 45000);

If you want to not specify column name then it’s sure that each column value must write.

Example :

insert into employee values('101', 'Pradeep', 45000); 

Here it is clear that you will not write all column value then arise an error.
Example :

insert into employee values('101');

The above query does not compile because MySQL engine not able to specify which column value query taken. But if you will write query with column name then it’s ok.

Example :

insert into employee(id) values('101');

In above query all remaining column value will insert null.


jQuery simple example

jQuery simple example :

With any IDE you can start jQuery simply just create a folder “js” in your project folder paste jQuery jar file. Create a html file and see the jQuery demo like in below example.


<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="js/jquery-1.9.1.min.js"></script>

<p> Click me to disappear!!</p>