Browsed by
Month: July 2015

Difference Between ALTER and UPDATE in database ?

Difference Between ALTER and UPDATE in database ?

ALTER is a DDL (Data Definition Language) statement. Whereas UPDATE is a DML (Data Manipulation Language) statement. ALTER is used to update the structure of the table (add/remove field/index etc). Whereas UPDATE is used to update data. Example of ALTER: ALTER TABLE Persons ADD PRIMARY KEY (P_Id) Example of UPDATE: UPDATE table_name SET column1=value1,column2=value2,… WHERE some_column=some_value;

Installing and Running mysql in Linux/Ubuntu

Installing and Running mysql in Linux/Ubuntu

This is short article to give basic instruction how to install mysql in Linux from terminal. First open terminal and use this command: sudo apt-get install mysql-server During the installation process you will be prompt to install root password. After the installation process is completed you can check whether mysql server is running or not by using following command. sudo netstat -tap | grep mysql When you run the above command you may see the…

Read full Article Read More

Implementing Polymorphism in C++

Implementing Polymorphism in C++

Polymorphism means one name different forms. Polymorphism occurs in program when we inherit  base class to derived class having similar function. When base class has same function name as in derived class than the program return the value in base class because of early binding or static binding. In early binding function in the base class is read by compiler and its returns the same value during execution. #include <iostream> using namespace std; class Pizza{…

Read full Article Read More

Installing Sublime text in Linux

Installing Sublime text in Linux

Installing sublime text through command line is very easy. First you have to adds a PPA to your list of sources, so that Ubuntu knows to look for updates from that PPA as well as from the official Ubuntu sources. If you do not add this ppa then you will get less recent version of any application. Then, you need to the update the local database to know what package can be installed and from…

Read full Article Read More

Displaying Profile Using Java “super” and “this” Keywords

Displaying Profile Using Java “super” and “this” Keywords

Recently, I was learning about Java super and this Keyword. So, I wanted to share this knowledge with you with my small program that explained a lot about using them. public class CheckingSuper { public static void main(String args[]) { Student student = new Student(); student.printIt(); } } class Person { public String name = “Saugat Bhattarai”; public void printIt() { System.out.println(“Hello this is me ” + name); } } class Student extends Person {…

Read full Article Read More