Monthly Archive: February 2016

ADD NEW COLUMN TO TABLE

Keywords: ALTER TABLE, ADD Syntax: Add Single Column ALTER TABLE table_name ADD column_Name dataType(size); Example: ALTER TABLE dept_049 ADD name Varchar2(20); Add Multiple Columns

Example:

DELETE or DROP COLUMN FROM TABLE

Keywords: ALTER TABLE, DROP COLUMN Syntax: DROP one column. ALTER TABLE TABLE_NAME DROP COLUMN COLUMN_NAME; Example: Alter Table dept_049 DROP COLUMN loc; DROP Multiple Columns. ALTER TABLE TABLE_NAME DROP ( col1, col2, …. );...

UPDATE RECORD IN TABLE

Keywords: UPDATE, SET, WHERE Syntax: Update all Rows. UPDATE Table_Name SET colName=’newValue’; Example: UPDATE emp_049 SET salary=5000; Update Specific Record. UPDATE Table_Name SET colName=’newValue’ WHERE Condition; Example: UPDATE emp_049 SET comm=3.4 WHERE salary>3000; Update...

Selection Sort Program in C++

Selection sort is another technique to sort your given values or array. In this technique you find the lowest or highest value and swap to first or last index.

 

DELETE RECORD FROM TABLE

Keywords: DELETE, FROM, WHERE Syntax: Delete all record/rows from table. DELETE FROM TABLE_NAME; Example: DELETE FROM dept_049 Delete specific Record/row from table. DELETE FROM TABLE_NAME WHERE CONDITION; Example: Delete from dept_049 where dept_id=20;

Prime Number Program in C++

This program get the number and check is it primer number or not. The logic of this program is that it will take number and will divide the given number to all sub numbers...

Table Program with Recursion

This program is to print the table of any integer using recursion. You need to enter the number this program will automatically print table of that number in the exact table format.

 

FETCH RECORD FROM TABLE

Keywords: SELECT, FROM, WHERE, * (to fetch all columns) Syntax: To Fetch all Rows and Columns SELECT * FROM table_name; Example: SELECT * FROM DEPT_049; Screen Shot: (Fetching/Getting all rows and columns from DEPT_049...

INSERT VALUES INTO TABLE

Keywords: INSERT INTO, VALUES Syntax: To insert value into all columns INSERT INTO TABLE_NAME VALUES(c1value, c2value……); Example: INSERT INTO DEPT_049(1,’SE’,’B-BLOCK’); It will required all columns’ value. If you want to skip value for specific...

Matrix Solved in C++

Here is the code that will solve the matrix. You need just 3 loops to solve the matrix. You can change rows and columns on your desire or requirement. Matrix Solved Program in C++...