Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SQL: Popular Command List
#1
Clap 
0
Hi guys,
This is a list of Popular SQL commands that we encounter in our hacktivities, and its very important to know them and how they are being used.
SQL, ‘Structured Query Language’, is a programming language designed to manage data stored in relational databases. SQL operates through simple, declarative statements. This keeps data accurate and secure, and helps maintain the integrity of databases, regardless of size.

1.       ALTER TABLE
Code:
[color=#ffffff][/color]
Code:
[align=left][color=#ffffff]ALTER TABLE table_name ADD column datatype;[/color][/align]
[align=left][color=#ffffff]
ALTER TABLE lets you add columns to a table in a database.

2.   AND
Code:
[align=left][color=#ffffff]SELECT column_name(s)[/color][/align]
[align=left][color=#ffffff]FROM table_name[/color][/align]
[align=left][color=#ffffff]WHERE column_1 = value_1[/color][/align]
[align=left][color=#ffffff]AND column_2 = value_2;[/color][/align]
[align=left][color=#ffffff]
AND is an operator that combines two conditions. Both conditions must be true for the row to be included in the result set.

3.     AS
Code:
[align=left][color=#ffffff]SELECT column_name AS 'Alias'[/color][/align]
[align=left][color=#ffffff]FROM table_name;[/color][/align]
[align=left][color=#ffffff]
AS is a keyword in SQL that allows you to rename a column or table using an alias.

4.   AVG
Code:
[align=left][color=#ffffff]SELECT AVG(column_name)[/color][/align]
[align=left][color=#ffffff]FROM table_name;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
AVG() is an aggregate function that returns the average value for a numeric column.

5.   BETWEEN
Code:
[align=left][color=#ffffff]SELECT column_name(s)[/color][/align]
[align=left][color=#ffffff]FROM table_name[/color][/align]
[align=left][color=#ffffff]WHERE column_name BETWEEN value_1 AND value_2;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
The BETWEEN operator is used to filter the result set within a certain range. The values can be numbers, text or dates.

6.   COUNT
Code:
[align=left][color=#ffffff]SELECT COUNT(column_name)[/color][/align]
[align=left][color=#ffffff]FROM table_name;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
COUNT() is a function that takes the name of a column as an argument and counts the number of rows where the column is not NULL.

7.   CREATE TABLE
Code:
[align=left][color=#ffffff]CREATE TABLE table_name (column_1 datatype, column_2 datatype, column_3 datatype);[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
CREATE TABLE creates a new table in the database. It allows you to specify the name of the table and the name of each column in the table.
8.   DELETE
Code:
[align=left][color=#ffffff]DELETE FROM table_name WHERE some_column = some_value;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
DELETE statements are used to remove rows from a table.

9.   GROUP BY
Code:
[align=left][color=#ffffff]SELECT COUNT(*)[/color][/align]
[align=left][color=#ffffff]FROM table_name[/color][/align]
[align=left][color=#ffffff]GROUP BY column_name;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
GROUP BY is a clause in SQL that is only used with aggregate functions. It is used in collaboration with the SELECT statement to arrange identical data into groups.
10.   INNER JOIN
Code:
[align=left][color=#ffffff]SELECT column_name(s) FROM table_1[/color][/align]
[align=left][color=#ffffff]JOIN table_2[/color][/align]
[align=left][color=#ffffff]ON table_1.column_name = table_2.column_name;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
An inner join will combine rows from different tables if the join condition is true.

11.   INSERT
Code:
[align=left][color=#ffffff]INSERT INTO table_name (column_1, column_2, column_3) VALUES (value_1, 'value_2', value_3);[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
INSERT statements are used to add a new row to a table.
12.   LIKE
Code:
[align=left][color=#ffffff]SELECT column_name(s)[/color][/align]
[align=left][color=#ffffff]FROM table_name[/color][/align]
[align=left][color=#ffffff]WHERE column_name LIKE pattern;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
LIKE is a special operator used with the WHERE clause to search for a specific pattern in a column.

13.   LIMIT
Code:
[align=left][color=#ffffff]SELECT column_name(s)[/color][/align]
[align=left][color=#ffffff]FROM table_name[/color][/align]
[align=left][color=#ffffff]LIMIT number;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
LIMIT is a clause that lets you specify the maximum number of rows the result set will have.

14.   MAX
Code:
[align=left][color=#ffffff]SELECT MAX(column_name)[/color][/align]
[align=left][color=#ffffff]FROM table_name;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
MAX() is a function that takes the name of a column as an argument and returns the largest value in that column.

15.   MIN
Code:
[align=left][color=#ffffff]SELECT MIN(column_name)[/color][/align]
[align=left][color=#ffffff]FROM table_name;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
MIN() is a function that takes the name of a column as an argument and returns the smallest value in that column.

16.   OR
Code:
[align=left][color=#ffffff]SELECT column_name[/color][/align]
[align=left][color=#ffffff]FROM table_name[/color][/align]
[align=left][color=#ffffff]WHERE column_name = value_1[/color][/align]
[align=left][color=#ffffff]OR column_name = value_2;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
OR is an operator that filters the result set to only include rows where either condition is true.

17.   ORDER BY
Code:
[align=left][color=#ffffff]SELECT column_name[/color][/align]
[align=left][color=#ffffff]FROM table_name[/color][/align]
[align=left][color=#ffffff]ORDER BY column_name ASC|DESC;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
ORDER BY is a clause that indicates you want to sort the result set by a particular column either alphabetically or numerically.

18.   OUTER JOIN
Code:
[align=left][color=#ffffff]SELECT column_name(s) FROM table_1[/color][/align]
[align=left][color=#ffffff]LEFT JOIN table_2[/color][/align]
[align=left][color=#ffffff]ON table_1.column_name = table_2.column_name;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
An outer join will combine rows from different tables even if the the join condition is not met. Every row in the left table is returned in the result set, and if the join condition is not met, then NULL values are used to fill in the columns from the right table.

19.   ROUND
Code:
[align=left][color=#ffffff]SELECT ROUND(column_name, integer)[/color][/align]
[align=left][color=#ffffff]FROM table_name;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
ROUND() is a function that takes a column name and an integer as an argument. It rounds the values in the column to the number of decimal places specified by the integer.

20.   SELECT
Code:
[align=left][color=#ffffff]SELECT column_name FROM table_name;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
SELECT statements are used to fetch data from a database. Every query will begin with SELECT.

21.   SELECT DISTINCT
Code:
[align=left][color=#ffffff]SELECT DISTINCT column_name FROM table_name;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
SELECT DISTINCT specifies that the statement is going to be a query that returns unique values in the specified column(s).

22.   SUM
Code:
[align=left][color=#ffffff]SELECT SUM(column_name)[/color][/align]
[align=left][color=#ffffff]FROM table_name;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
SUM() is a function that takes the name of a column as an argument and returns the sum of all the values in that column.

23.   UPDATE
Code:
[align=left][color=#ffffff]UPDATE table_name[/color][/align]
[align=left][color=#ffffff]SET some_column = some_value[/color][/align]
[align=left][color=#ffffff]WHERE some_column = some_value;[/color][/align]
[align=left][color=#ffffff][color=#ffffff][/color][color=#ffffff]
UPDATE statments allow you to edit rows in a table.

24.   WHERE
Code:
[align=left][color=#ffffff]SELECT column_name(s)[/color][/align]
[align=left][color=#ffffff]FROM table_name[/color][/align]
[align=left][color=#ffffff]WHERE column_name operator value;[/color][/align]
[align=left][color=#ffffff][color=#ffffff]
WHERE is a clause that indicates you want to filter the result set to include only rows where the following condition is true.
Contact me for any help or forum credit... Thanks
#2
0
When you have all your items, you are prepared to get ready your own Wigs
head of hair. Before installing the lace wig, you will need to wash and condition your own hair. To maintain your locks wholesome and scalp from Wigs
scratching, an excellent wash and serious conditioner are recommended. Ensure the locks is completely dried up and moisturized. If you have damaged hair or split ends, a trim is also encouraged. One of several primary good reasons to Wigs For Women
put on a lace wig is advertise healthier hair although having versatility.

Right after washing your hair and undertaking any one of the advised hair treatment options, you may have 2 choices. Some women decide to wear a pores and skin Wigs
toned wig limit under the lace wig for additional security while others basically brush their locks back and then utilize. If you want to use the wig cover ensure that it fits the skin sculpt. You can braid the hair beneath the cover or simply cover it.

A good idea to produce an even more practical hunting scalp is to apply Ace bandage. Ace bandage is a very Wigs For Black Women
inexpensive sporting bandage for muscle mass traumas that may be purchased at your neighborhood pharmacy. It clings to itself so no stick or adhesive tape is used to the your hair or head. The feel of the bandage provides a bumpy look which mimics the head physical appearance below the lace entrance wig. It just Human Hair Wigs
has to be packaged around the head either on the top of a consistent wig limit or right to your hair. Make sure you purify your hairline with rubbing alcohol and permit it to dry fully.

After you have your materials, you are ready to put together your very own Cheap Wigs
locks. You will need to wash and condition your own hair before installing the lace wig. And also hardwearing . your hair healthier and head from Wigs For Women
itchiness, an excellent scrub and deeply conditioner are advised. Ensure that the hair is completely dry and moist. A trim is also encouraged if you have damaged hair or split ends. Among the main excellent reasons to Wigs
wear a lace wig is promote healthy hair whilst getting versatility.

Soon after cleansing your hair and performing any one of the suggested locks remedies, you have 2 choices. Some ladies decide to dress in a epidermis African American Wigs
nicely toned wig limit underneath the lace wig for additional stability although some simply remember to brush their locks back and then utilize. If you wish to dress in the wig cap be sure that it complements your skin layer strengthen. It is possible to braid hair beneath the cover or perhaps place it.

A good idea to generate an even more reasonable looking scalp is to use Ace bandage. Ace bandage is a very Cosplay Wigs
inexpensive sports bandage for muscle mass traumas that can be purchased at your nearby drugstore. It clings to itself so no stick or tape is applied for your locks or head. The texture of your bandage provides a bumpy appearance which mimics the head appearance underneath the lace front wig. It simply Dresslily Wigs
has to be wrapped throughout the go both in addition to a consistent wig cap or right to the hair. Ensure that you purify your hairline with rubbing alcoholic drinks and let it dried out completely.
  


Forum Jump:


Users browsing this thread:
1 Guest(s)

SQL: Popular Command List00