Home

How to delete a row in SQL ?

Published on 12-Dec-2021 20:58:57
We will be using the DELETE query to delete existing rows from the table: DELETE FROM table_name WHERE [condition]; We will start off by giving the keywords DELETE FROM, then we will give the name of the table, after that we will give the WHERE clause and give the condition on the basis of which we would want to delete a row. For example, from the employee table, if we would like to delete all the rows, where the age of the employee is ... Read More

How to change a table name in SQL ?

Published on 12-Dec-2021 20:48:01
This is the command to change a table name in SQL: ALTER TABLE table_name RENAME TO new_table_name; We will start off by giving the keywords ALTER TABLE, then we will follow it up by giving the original name of the table, after that, we will give in the keywords RENAME TO and finally, we will give the new table name. For example, if we want to change the “employee” table to “employee_information”, this will be the command: AL... Read More

How to delete a table in SQL ?

Published on 12-Dec-2021 20:41:30
There are two ways to delete a table from sql: DROP and TRUNCATE. The DROP TABLE command is used to completely delete the table from the database. This is the command: DROP TABLE table_name; The above command will completely delete all the data present in the table along with the table itself. But if we want to delete only the data present in the table but not the table itself, then we will use the truncate command: DROP TABLE table_n... Read More

How to create a table in SQL ?

SQL
Published on 12-Dec-2021 19:36:18
The command to create a table in sql is extremely simple: CREATE TABLE table_name ( column1 datatype, column2 datatype, column3 datatype, .... ); We will start off by giving the keywords, CREATE TABLE, then we will give the name of the table. After that in braces, we will list out all the columns along with their datatypes. For example, if we want to create a simple employee table: CREATE TABLE employee ( name varchar(25... Read More

What is SQL ?

Published on 12-Dec-2021 19:28:20
SQL stands for Structured Query Language. It is the primary language to interact with databases. With the help of SQL, we can extract data from a database, modify this data and also update it whenever there is a requirement. This query language is evergreen and is widely used across industries. For example, if a company has records of all the details of their employees in the database. With the help of SQL, all of this data can be queried to find... Read More

Write C program to find Exponent Power Series

Published on 12-Dec-2021 17:32:54
Program : A program to evaluate the power series x2 x3 xn ex = 1 + x + --- + --- + ..... + ---- 2! 3! n! , 0 < x < 1 It uses if……else to test the accuracy. The power series contains the recurrence relationship of the type Tn = Tn-1 (---) for n > 1 T1 = x for n = 1 T0 = 1 If Tn-1 (usually known as previous term) is known, then Tn (known as present term) ca... Read More

Write a ‘C’ Program to compute the sum of all elements stored in an array using pointers

Published on 12-Dec-2021 17:17:20
C Program to compute sum of the array elements using pointers Program : #include <stdio.h> #include <conio.h> void main() { int numArray[10]; int i, sum = 0; int *ptr; printf("\nEnter 10 elements : "); for (i = 0; i < 10; i++) scanf("%d", &numArray[i]); ptr = numArray; /* a=&a[0] */ for (i = 0; i < 10; i++) { sum = sum + *ptr; ptr++; } printf("... Read More

How to check the type of triangle using C

Published on 12-Dec-2021 17:04:29
C Program to check the type of triangle #include <stdio.h> #include <math.h> int main() { int side1, side2, side3; //Change values accordingly side1 = 5; side2 = 4; side3 = 3; if ((side1 + side2 > side3 && side1 + side3 > side2 && side2 + side3 > side1) && (side1 > 0 && side2 > 0 && side3 > 0)) { if (side1 == side2 &&am... Read More

How to Calculate Area of Circle using C Programming

Published on 12-Dec-2021 13:16:37
C Program to Calculate Area of Circle Shape : Circle Formula : Π * r * r Definition : 1. Ellipse in which the two axes are of equal length 2. Plane curve generated by one point moving at a constant distance from a fixed point 3. You can compute the area of a Circle if you know its radius. Program : #include <stdio.h> int main() { float radius, area; printf("\nEnter the radius of Circle : "); scanf("%d", &... Read More