News | Guttertechs.net | Page: 2

SQL SELECT DISTINCT Statement – SQL TUTORIAL | Software Testing Material

SQL Select Distinct: SQL SELECT DISTINCT query is used to return only unique values. It eliminates all the duplicated values. Syntax: SELECT DISTINCT column_name,column_name FROM table_name; 1 SELECT DISTINCT column_name,column_name FROM table_name; Example: SELECT DISTINCT Fours FROM SCOREBOARD; 1 SELECT DISTINCT Fours FROM SCOREBOARD; In the below image, you could find two SELECT queries. Total number of…

SQL Overview – SQL TUTORIAL | Software Testing Material

SQL Overview: SQL Overview: SQL stands for Structured Query Language. It is an American National Standard Institute (ANSI) standard. It is a standard language for accessing and manipulating databases. Using SQL, some of the action we could do are to create databases, tables, stored procedures (SP’s), execute queries, retrieve, insert, update, delete data against a database. SQL…

SQL ORDER BY keyword – SQL TUTORIAL | Software Testing Material

SQL ORDER BY keyword: SQL ORDER BY keyword is used to sort the data in ascending or descending order, based on one or more columns. Syntax: SELECT column_name_1, column_name_2 FROM table_name ORDER BY column_name_1 ASC|DESC, column_name_2 ASC|DESC; 1 SELECT column_name_1, column_name_2 FROM table_name ORDER BY column_name_1 ASC|DESC, column_name_2 ASC|DESC; Example: Order By – Ascending Order: SELECT * FROM SCOREBOARD ORDER BY…

SQL Operators – SQL Tutorial | Software Testing Material

SQL Operators: In this post, we see SQL Operators in detail. SQL Operator is a reserved word used primarily in an SQL statement’s WHERE clause to perform operations, such as arithmetic operations and comparisons. These are used to specify conditions in an SQL statement. There are are three types of Operators. Arithmetic Operators Comparison Operators Logical…

SQL LIKE Operator – SQL TUTORIAL | Software Testing Material

SQL LIKE Operator: The SQL LIKE operator is used in a WHERE clause to compare a value to similar values using wildcard operators. There are two wildcard operators used in conjunction with the Like operator. Percentage sign ( % ) Underscore sign ( _ ) SQL LIKE Syntax: SELECT column_name(s) FROM table_name WHERE column_name LIKE somevalue; 1 SELECT column_name(s) FROM table_name WHERE column_name LIKE…

SQL Insert Query – SQL TUTORIAL | Software Testing Material

SQL Insert Query: The SQL INSERT INTO statement is used to insert new records in a table. Syntax: INSERT INTO table_name (column_name_1,column_name_2,column_name_3,… column_name_n) VALUES (value_1,value_2,value_3,…value_n); 1 INSERT INTO table_name (column_name_1,column_name_2,column_name_3,… column_name_n) VALUES (value_1,value_2,value_3,…value_n); Here, column_name_1, column_name_2,…column_name_N are the names of the columns in the table into which you want to insert data. Example: Following statements would create…

SQL IN Operator – SQL TUTORIAL | Software Testing Material

SQL IN Operator: The SQL IN operator allows you to test if an expression matches any value in a list of values. It is specified with in a WHERE clause. Syntax: SELECT column_name(s) FROM table_name WHERE column_name IN (value_1,value_2,…value_n); 1 SELECT column_name(s) FROM table_name WHERE column_name IN (value_1,value_2,…value_n); Example: SELECT * FROM SCOREBOARD WHERE Runs IN (100,90); 1 SELECT *…

SQL HAVING – SQL Tutorial | Software Testing Material

SQL Having: While using aggregate functions, we couldn’t use WHERE clause. We need to use SQL HAVING clause while using aggregate functions. The HAVING Clause places conditions on Groups created by the GROUP BY clause where as the WHERE Clause places conditions on the selected columns. Syntax: SELECT column_name(s)FROM table_nameWHERE conditionGROUP BY column_name(s)HAVING conditionORDER BY…

SQL GROUP BY – SQL Tutorial | Software Testing Material

SQL Group By: The SQL GROUP BY statement is often used with aggregate functions (COUNT, MAX, MIN, SUM, AVG) to group the result-set by one or more columns. Syntax: SELECT column_name(s) FROM table_name WHERE condition GROUP BY column_name(s) ORDER BY column_name(s); 1 SELECT column_name(s) FROM table_name WHERE condition GROUP BY column_name(s) ORDER BY column_name(s); Example:…

SQL Drop – SQL TUTORIAL | Software Testing Material

SQL Drop Table: The SQL DROP TABLE statement is used to delete a table definition and all data, indexes, triggers, constraints, and permission specifications for that table. NOTE: Once a table is deleted then all the information in the table would be lost forever. Please be careful while using this statement. . Syntax: DROP TABLE table_name;…