[go: up one dir, main page]

0% found this document useful (0 votes)
43 views61 pages

Sap NOTES

sql work

Uploaded by

Syed faizanuddin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views61 pages

Sap NOTES

sql work

Uploaded by

Syed faizanuddin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 61

Keyword Description

ADD Adds a column in an existing table

ADD CONSTRAINT Adds a constraint after a table is already created

ALL Returns true if all of the subquery values meet the condition

ALTER Adds, deletes, or modifies columns in a table, or changes the data


type of a column in a table
ALTER COLUMN Changes the data type of a column in a table

ALTER TABLE Adds, deletes, or modifies columns in a table

AND Only includes rows where both conditions is true

ANY Returns true if any of the subquery values meet the condition

AS Renames a column or table with an alias

ASC Sorts the result set in ascending order

BACKUP DATABASE Creates a back up of an existing database

BETWEEN Selects values within a given range

CASE Creates different outputs based on conditions

CHECK A constraint that limits the value that can be placed in a column

COLUMN Changes the data type of a column or deletes a column in a table

CONSTRAINT Adds or deletes a constraint

CREATE Creates a database, index, view, table, or procedure

CREATE DATABASE Creates a new SQL database

CREATE INDEX Creates an index on a table (allows duplicate values)

CREATE OR REPLACE VIEW Updates a view

CREATE TABLE Creates a new table in the database

CREATE PROCEDURE Creates a stored procedure

CREATE UNIQUE INDEX Creates a unique index on a table (no duplicate values)

CREATE VIEW Creates a view based on the result set of a SELECT statement

DATABASE Creates or deletes an SQL database

DEFAULT A constraint that provides a default value for a column

DELETE Deletes rows from a table


DESC Sorts the result set in descending order

DISTINCT Selects only distinct (different) values

DROP Deletes a column, constraint, database, index, table, or view

DROP COLUMN Deletes a column in a table

DROP CONSTRAINT Deletes a UNIQUE, PRIMARY KEY, FOREIGN KEY, or CHECK


constraint
DROP DATABASE Deletes an existing SQL database

DROP DEFAULT Deletes a DEFAULT constraint

DROP INDEX Deletes an index in a table

DROP TABLE Deletes an existing table in the database

DROP VIEW Deletes a view

EXEC Executes a stored procedure

EXISTS Tests for the existence of any record in a subquery

FOREIGN KEY A constraint that is a key used to link two tables together

FROM Specifies which table to select or delete data from

FULL OUTER JOIN Returns all rows when there is a match in either left table or right
table
GROUP BY Groups the result set (used with aggregate functions: COUNT,
MAX, MIN, SUM, AVG)
HAVING Used instead of WHERE with aggregate functions

IN Allows you to specify multiple values in a WHERE clause

INDEX Creates or deletes an index in a table

INNER JOIN Returns rows that have matching values in both tables

INSERT INTO Inserts new rows in a table

INSERT INTO SELECT Copies data from one table into another table

IS NULL Tests for empty values

IS NOT NULL Tests for non-empty values

JOIN Joins tables

LEFT JOIN Returns all rows from the left table, and the matching rows from the
right table
LIKE Searches for a specified pattern in a column

LIMIT Specifies the number of records to return in the result set


NOT Only includes rows where a condition is not true

NOT NULL A constraint that enforces a column to not accept NULL values

OR Includes rows where either condition is true

ORDER BY Sorts the result set in ascending or descending order

OUTER JOIN Returns all rows when there is a match in either left table or right
table
PRIMARY KEY A constraint that uniquely identifies each record in a database table

PROCEDURE A stored procedure

RIGHT JOIN Returns all rows from the right table, and the matching rows from
the left table
ROWNUM Specifies the number of records to return in the result set

SELECT Selects data from a database

SELECT DISTINCT Selects only distinct (different) values

SELECT INTO Copies data from one table into a new table

SELECT TOP Specifies the number of records to return in the result set

SET Specifies which columns and values that should be updated in a


table
TABLE Creates a table, or adds, deletes, or modifies columns in a table, or
deletes a table or data inside a table
TOP Specifies the number of records to return in the result set

TRUNCATE TABLE Deletes the data inside a table, but not the table itself

UNION Combines the result set of two or more SELECT statements (only
distinct values)
UNION ALL Combines the result set of two or more SELECT statements (allows
duplicate values)
UNIQUE A constraint that ensures that all values in a column are unique

UPDATE Updates existing rows in a table

VALUES Specifies the values of an INSERT INTO statement

VIEW Creates, updates, or deletes a view

WHERE Filters a result set to include only records that fulfill a specified
condition
Some of The Most Important SQL
Commands
SELECT - extracts data from a database

UPDATE - updates data in a database

DELETE - deletes data from a database

INSERT INTO - inserts new data into a database

CREATE DATABASE - creates a new database

ALTER DATABASE - modifies a database

CREATE TABLE - creates a new table

ALTER TABLE - modifies a table

DROP TABLE - deletes a table

CREATE INDEX - creates an index (search key)

DROP INDEX - deletes an index


1)

a)

b)

2)

a)

b)

c)
3)

a)

b)

c)

4)
a)

b)

c)

5)

6)

a)
b)

C)

d)

e)

7)
8)

a)

b)

c)

d)

9)
a)

b)

10)

11)
12)

13)
14)

15)
The SQL SELECT Statement

The SELECT statement is used to select data from a database.

Return data from the Customers table:


SELECT is used from required coulamn
SELECT CustomerName, City FROM Customers;
SELECT column1, column2, FROM table_name;

SELECT is used all the coulam from table


If you want to return all columns, without specifying every column name, you can use the SELECT * syntax:

Example
Return all the columns from the Customers table:
SELECT * FROM Customers

The SQL UPDATE Statement


The UPDATE statement is used to modify the existing records in a table.

UPDATE Syntax

UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;

Example
The following SQL statement updates the first customer (CustomerID = 1) with a new contact person and a new city.
UPDATE Customers
SET ContactName = 'Alfred Schmidt', City= 'Frankfurt'
WHERE CustomerID = 1;

UPDATE Multiple Records


It is the WHERE clause that determines how many records will be updated.
The following SQL statement will update the ContactName to "Juan" for all records where country is "Mexico":

Example
UPDATE Customers
SET ContactName='Juan'
WHERE Country='Mexico';

Update Warning
Be careful when updating records. If you omit the WHERE clause, ALL records will be updated!

Example
UPDATE Customers
SET ContactName='Juan';

The SQL DELETE Statement


The DELETE statement is used to delete existing records in a table.

DELETE Syntax
DELETE FROM table_name WHERE condition;
Note: Be careful when deleting records in a table! Notice the WHERE clause in the DELETE statement. The WHERE clause specifi
record(s) should be deleted. If you omit the WHERE clause, all records in the table will be deleted!

SQL DELETE with condition


The following SQL statement deletes the customer "Alfreds Futterkiste" from the "Customers" table:

Example
DELETE FROM Customers WHERE CustomerName='Alfreds Futterkiste';

Delete All Records


It is possible to delete all rows in a table without deleting the table. This means that the table structure, attributes, and ind
intact:
DELETE FROM table_name;
The following SQL statement deletes all rows in the "Customers" table, without deleting the table:

Example
DELETE FROM Customers;

Delete a Table
To delete the table completely, use the DROP TABLE statement:

Example
Remove the Customers table:
DROP TABLE Customers;

The SQL INSERT INTO Statement


The INSERT INTO statement is used to insert new records in a table.
It is possible to write the INSERT INTO statement in two ways:
1. Specify both the column names and the values to be inserted:
INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...);
2. If you are adding values for all the columns of the table, you do not need to specify the column names in the SQL query.
make sure the order of the values is in the same order as the columns in the table. Here, the INSERT INTO syntax would be

INSERT INTO table_name


VALUES (value1, value2, value3, ...);

INSERT INTO Example


The following SQL statement inserts a new record in the "Customers" table:
INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)
VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway');

Insert Data Only in Specified Columns


It is also possible to only insert data in specific columns.
The following SQL statement will insert a new record, but only insert data in the "CustomerName", "City", and "Country" co
(CustomerID will be updated automatically):

Example
INSERT INTO Customers (CustomerName, City, Country)
VALUES ('Cardinal', 'Stavanger', 'Norway');

Insert Multiple Rows


It is also possible to insert multiple rows in one statement.
To insert multiple rows of data, we use the same INSERT INTO statement, but with multiple values:

Example
INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)
VALUES
('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway'),
('Greasy Burger', 'Per Olsen', 'Gateveien 15', 'Sandnes', '4306', 'Norway'),
('Tasty Tee', 'Finn Egan', 'Streetroad 19B', 'Liverpool', 'L1 0AA', 'UK');

The SQL CREATE DATABASE Statement


The CREATE DATABASE statement is used to create a new SQL database.

Syntax
CREATE DATABASE databasename;
The following SQL statement creates a database called "testDB":
CREATE DATABASE testDB;
Tip: Make sure you have admin privilege before creating any database. Once a database is created, you can check it in the
databases with the following SQL command: SHOW DATABASES;

SQL ALTER TABLE Statement


The ALTER TABLE statement is used to add, delete, or modify columns in an existing table.
The ALTER TABLE statement is also used to add and drop various constraints on an existing table.

ALTER TABLE - ADD Column


To add a column in a table, use the following syntax:
ALTER TABLE table_name
ADD column_name datatype;
The following SQL adds an "Email" column to the "Customers" table:
ALTER TABLE Customers
ADD Email varchar(255);

ALTER TABLE - DROP COLUMN


To delete a column in a table, use the following syntax (notice that some database systems don't allow deleting a column):
ALTER TABLE table_name
DROP COLUMN column_name;
The following SQL deletes the "Email" column from the "Customers" table:

Example
ALTER TABLE Customers
DROP COLUMN Email;

ALTER TABLE - DROP COLUMN


To delete a column in a table, use the following syntax (notice that some database systems don't allow deleting a column):
ALTER TABLE table_name
DROP COLUMN column_name;
The following SQL deletes the "Email" column from the "Customers" table:

Example
ALTER TABLE Customers
DROP COLUMN Email;

ALTER TABLE - RENAME COLUMN


To rename a column in a table, use the following syntax:
ALTER TABLE table_name
RENAME COLUMN old_name to new_name;

ALTER TABLE - ALTER/MODIFY DATATYPE


To change the data type of a column in a table, use the following syntax:
SQL Server / MS Access:
ALTER TABLE table_name
ALTER COLUMN column_name datatype;
My SQL / Oracle (prior version 10G):
ALTER TABLE table_name
MODIFY COLUMN column_name datatype;

The SQL CREATE TABLE Statement


The CREATE TABLE statement is used to create a new table in a database.

Syntax
CREATE TABLE table_name (column1 datatype,column2 datatype,column3 datatype,…)

SQL CREATE TABLE Example


The following example creates a table called "Persons" that contains five columns: PersonID, LastName, FirstName, Addres
CREATE TABLE Persons (
PersonID int,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
);

SQL ALTER TABLE Statement


The ALTER TABLE statement is used to add, delete, or modify columns in an existing table.
The ALTER TABLE statement is also used to add and drop various constraints on an existing table.

ALTER TABLE - ADD Column


To add a column in a table, use the following syntax:
ALTER TABLE table_name
ADD column_name datatype;
The following SQL adds an "Email" column to the "Customers" table:
ALTER TABLE Customers
ADD Email varchar(255);

ALTER TABLE - DROP COLUMN


To delete a column in a table, use the following syntax (notice that some database systems don't allow deleting a column):
ALTER TABLE table_name
DROP COLUMN column_name;
The following SQL deletes the "Email" column from the "Customers" table:

Example
ALTER TABLE Customers
DROP COLUMN Email;

ALTER TABLE - RENAME COLUMN


To rename a column in a table, use the following syntax:
ALTER TABLE table_name
RENAME COLUMN old_name to new_name;

ALTER TABLE - ALTER/MODIFY DATATYPE


To change the data type of a column in a table, use the following syntax:
SQL Server / MS Access:
ALTER TABLE table_name
ALTER COLUMN column_name datatype;

The SQL DROP TABLE Statement


The DROP TABLE statement is used to drop an existing table in a database.

Syntax
DROP TABLE table_name;
Note: Be careful before dropping a table. Deleting a table will result in loss of complete information stored in the table!

SQL DROP TABLE Example


The following SQL statement drops the existing table "Shippers":
DROP TABLE Shippers;

SQL TRUNCATE TABLE


The TRUNCATE TABLE statement is used to delete the data inside a table, but not the table itself.

Syntax
TRUNCATE TABLE table_name;

The SQL BACKUP DATABASE Statement


The BACKUP DATABASE statement is used in SQL Server to create a full back up of an existing SQL database.

Syntax
BACKUP DATABASE databasename
TO DISK = 'filepath';

The SQL BACKUP WITH DIFFERENTIAL Statement


A differential back up only backs up the parts of the database that have changed since the last full database backup.

Syntax
BACKUP DATABASE databasename
TO DISK = 'filepath'
WITH DIFFERENTIAL;

BACKUP DATABASE Example


The following SQL statement creates a full back up of the existing database "testDB" to the D disk:
BACKUP DATABASE testDB
TO DISK = 'D:\backups\testDB.bak';

Tip: Always back up the database to a different drive than the actual database. Then, if you get a disk crash, you will not lo
backup file along with the database.

BACKUP WITH DIFFERENTIAL Example


The following SQL statement creates a differential back up of the database "testDB":

Example
BACKUP DATABASE testDB
TO DISK = 'D:\backups\testDB.bak'
WITH DIFFERENTIAL;

SQL CREATE INDEX Statement


The CREATE INDEX statement is used to create indexes in tables.
Indexes are used to retrieve data from the database more quickly than otherwise. The users cannot see the indexes, they a
to speed up searches/queries.
Note: Updating a table with indexes takes more time than updating a table without (because the indexes also need an u
only create indexes on columns that will be frequently searched against.

CREATE INDEX Syntax


Creates an index on a table. Duplicate values are allowed:
CREATE INDEX index_name
ON table_name (column1, column2, ...);

CREATE UNIQUE INDEX Syntax


Creates a unique index on a table. Duplicate values are not allowed:
CREATE UNIQUE INDEX index_name
ON table_name (column1, column2, ...);
Note: The syntax for creating indexes varies among different databases. Therefore: Check the syntax for creating indexes
database.

CREATE INDEX Example


The SQL statement below creates an index named "idx_lastname" on the "LastName" column in the "Persons" table:
CREATE INDEX idx_lastname
ON Persons (LastName);
If you want to create an index on a combination of columns, you can list the column names within the parentheses, separa
commas:
CREATE INDEX idx_pname
ON Persons (LastName, FirstName);

DROP INDEX Statement


The DROP INDEX statement is used to delete an index in a table.
MS Access:
DROP INDEX index_name ON table_name;
SQL Server:
DROP INDEX table_name.index_name;
MySQL:
ALTER TABLE table_name
DROP INDEX index_name;

The SQL MIN() and MAX() Functions


The MIN() function returns the smallest value of the selected column.
The MAX() function returns the largest value of the selected column.
SELECT MIN(Price)
FROM Products;

MAX Example
SELECT MAX(Price)
FROM Products;

Syntax
SELECT MIN(column_name)
FROM table_name
WHERE condition;

SELECT MAX(column_name)
FROM table_name
WHERE condition;

The SQL COUNT() Function


The COUNT() function returns the number of rows that matches a specified criterion.
Find the total number of products in the Products table:
SELECT COUNT(*)
FROM Products;

Syntax
SELECT COUNT(column_name)
FROM table_name
WHERE condition;

Add a Where Clause


You can add a WHERE clause to specify conditions:

Example
Find the number of products where Price is higher than 20:
SELECT COUNT(ProductID)
FROM Products
WHERE Price > 20;

Specify Column
You can specify a column name instead of the asterix symbol (*).
If you specify a column instead of (*), NULL values will not be counted.

Example
Find the number of products where the ProductName is not null:
SELECT COUNT(ProductName)
FROM Products;

The SQL SUM() Function


The SUM() function returns the total sum of a numeric column.
Return the sum of all Quantity fields in the OrderDetails table:
SELECT SUM(Quantity)
FROM OrderDetails;

Syntax
SELECT SUM(column_name)
FROM table_name
WHERE condition;

Add a Where Clause


You can add a WHERE clause to specify conditions:

Example
Return the number of orders made for the product with ProductID 11:
SELECT SUM(Quantity)
FROM OrderDetails
WHERE ProductId = 11;

SQL constraints are used to specify rules for data in a table.

Create Constraints
Constraints can be specified when the table is created with the CREATE TABLE statement, or after the table is created with th
TABLE statement.

Syntax
CREATE TABLE table_name (
column1 datatype constraint,
column2 datatype constraint,
column3 datatype constraint,
....
);

MySQL Constraints
SQL constraints are used to specify rules for the data in a table.

Constraints are used to limit the type of data that can go into a table. This ensures the accuracy and reliability of the data i
there is any violation between the constraint and the data action, the action is aborted.
Constraints can be column level or table level. Column level constraints apply to a column, and table level constraints apply
table.
The following constraints are commonly used in SQL:
NOT NULL - Ensures that a column cannot have a NULL value
UNIQUE - Ensures that all values in a column are different
PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely identifies each row in a table
FOREIGN KEY - Prevents actions that would destroy links between tables
CHECK - Ensures that the values in a column satisfies a specific condition
DEFAULT - Sets a default value for a column if no value is specified
CREATE INDEX - Used to create and retrieve data from the database very quickly
aggregrate function in SQL
An aggregate function in SQL performs a calculation on multiple values and returns a single value. SQL pr
many aggregate functions that include avg, count, sum, min, max, etc.An aggregate function ignores NULL
when it performs the calculation, except for the count function.

1) Count :-
SELECT COUNT(*) FROM (table name)
&
SELECT COUNT(coulamn name) FROM (table name)

2) MIN :- smallest value out put from coulam on avalable data.


SELECT MIN (coulamn name) FROM (table name)
&
SELECT MIN (coulamn name) FROM (table name) WHERE (condition)

3) MAX :- largest value out put from coulamn on valuable data.


SELECT MAX (coulamn name) FROM (table name)
&
SELECT MAX (coulamn name) FROM (table name) WHERE (condition)

4) SUM :- returns the out put total /sum value of numeric coulamn.
SELECT SUM (coulamn name) FROM (table name)
&
SELECT SUM (coulamn name) FROM (table name) WHERE (condition)

5) AVERAGE :- returns the out put AVERAGE value of numeric coulamn


SELECT AVG(coulamn name) FROM (table name)
&
SELECT AVG(coulamn name) FROM (table name) WHERE (condition)

Group By
Group Rows that have the same values in specified columns.
SELECT (coulamn name/department) function (AVG/SUM/MIN/MAX/COUNT) FROM (table name) GROUP BY (coulamn name
eg:- SELECT department, COUNT(name) as no of employees FROM employee GROUP BY department

Having
Used with GROUP BY to specify conditions & filter data
SELECT (coulamn name) , FUNCTION(AVG/SUM/MIN/MAX/COUNT) (coulamn name) FROM (table name) GROUP BY (coulamn
eg:- SELECT department, AVG (salary) FROM employee GROUP BY department HAVING AVG(salary) >15000

CREATE DATABE
SYNTEX :- CREATE DATABASE (database name)

CREATE TABLE
SYNTEX :- CREATE TABLE table name ( coulam1 int8 PRIMARY KEY,coulam2 VARACHAR(50));

SELECT

INSERT
epartment)

WHERE IS USED FOR FILTER CONDITION ON WHOLE TABLE AND HAVING IS USED FOR FILTER ON GROUP DATA

me /department) HAVING condition


500
Catogri Sum of Amount 450
misclenious 460
400
Total Result
350

300

250 Sum of Amount


Column C
200

150

100

50

0
misclenious Total Result
Sum of Amount

Sum of Amount misclenious


Column C Total Result

misclenious
100%
500
450
Sum of Amount
400
350
300
Axis Title

250
Sum of Amount misclenio
200
Column C Total Res
150
100
50
0
misclenious Total Result
misclenious
Axis Title 100%

This shape represents a slicer. Slicers are supported in Excel


2010 or later. This shape represents a slicer. Slicers are supported in
Excel 2010 or later.
If the shape was modified in an earlier version of Excel, or
if the workbook was saved in Excel 2003 or earlier, the If the shape was modified in an earlier version of Excel,
slicer cannot be used. if the workbook was saved in Excel 2003 or earlier, the
slicer cannot be used.
Amount

misclenious
Total Result

er. Slicers are supported in

n an earlier version of Excel, or


n Excel 2003 or earlier, the
Sr.No. Catogri Particular Amount
1 food groceries 350
2 food coldrink 120
3 food hotel meal 1260
4 utilities dress 460
5 utilities phone bill 100
6 utilities electric bill p 700
7 misclenious PETROL 160
8 misclenious STATIONRY 300
9 utilities DISH RECHAR 250
10 Rent Rent 1500
Total 1500

total 5200
SUM Average 520
CONDITIONAL FORMATING
FILTER
UNIQUE
SUMIF
INSERT SLICER
UNIQUE Catogri Amount
#NAME? 1730
#NAME? 1510
#NAME? 460
#NAME? 1500

V LOOKUP
H LOOKUP
PIVOTE
INDEX
MATCH
INDEXMATCH
MACROS
CONDITIONAL FORMATING
What IFRS means?
international financial reporting standards
What is IFRS? IFRS stands for international financial reporting standards. It's a set of accounting rules and standard

GAAP vs. IFRS FAQ


What is difference between GAAP and IFRS?
GAAP stands for Generally Accepted Accounting Principles, which are the generally accepted standards f
GAAP is a framework based on legal authority while IFRS is based on a principles-based approach.
GAAP is more detailed and prescriptive while IFRS is more high-level and flexible.
GAAP requires more disclosures while IFRS requires fewer disclosures.
GAAP is more focused on the historical cost of assets while IFRS allows for more flexibility in the valuatio

Which is better IFRS or GAAP?


It depends on the context. Generally speaking, IFRS is more widely used globally and is better for compan

Why is IFRS not used in the US?


IFRS (International Financial Reporting Standards) is not used in the US because the US government has

What is the difference between GAAP and IFRS in inventory?


GAAP and IFRS have some different requirements when it comes to inventory. Under GAAP, inventory m

GAAP
The generally accepted
What are the 4 basic principle

What Are The 4 GAAP Princ

The Cost Principle. The first p

The Revenues Principle. The

The Matching Principle. The

The Disclosure Principle. ...

What are audits?


An audit is a detailed examination or inspection of an existing system, report or entity, such as financial records. Th

Companies can use these analytical tools to identify areas of inefficiency and make corrective recommend

5 phases of the audit process


Regardless of the type of audit, there are several phases to complete, each with specific objectives that au

1. Planning: This phase involves understanding the scope and objectives of the au

2. Risk Assessment: In this phase, auditors evaluate the risks associated with the

3. Testing: This phase is about collecting and analyzing evidence to determine the

4. Reporting: In this phase, auditors report their findings to management and stake

5. Follow-up: During this last phase, auditors monitor the progress of corrective ac

15 types of audits
Here are 15 types of audits businesses and agencies may conduct:

1. Internal audit

A team or individual employee within an organization can conduct internal audits. This type of audit can he

Financial accounting and reporting

Policy and legal compliance

Effectiveness of current procedures

Operations concerns
Read more: 8 Common Internal Auditor Interview Questions and Answers

2. External audit

Unbiased third parties, such as government agencies and financial companies, conduct external audits. A

For example, a clothing retailer may hire an outside auditing agency to check for ways to improve inventor

Related: Learn About External vs. Internal Audits (Four Key Differences)

3. Tax audit

Agents of the IRS conduct tax audits to verify that the information filed on a company's tax returns is accur

The existence of a tax audit doesn't indicate any wrongdoing on the part of the company. The IRS choose
Related: What Is Asset Auditing? (Plus How It Can Help a Business)

4. Financial audit

Financial audits focus specifically on an organization's financial status. Auditors are responsible for verifyin

Related: Common Auditor Interview Questions

5. Operational audit

Operational audits are designed to evaluate and analyze an organization's operations, including policies, p

For example, a manufacturer may conduct an audit of the company's supply chain to identify ways to redu

6. Compliance audit

Compliance audits are used to determine if companies are compliant with internal and external regulations

Companies conduct compliance audits to maintain safe and fair working conditions, ensure product quality

Read more: What Is a Compliance Audit? (With 10 Types)

7. Information system audit

Information system audits review your team's information technology to ensure you're using best practices

Make sure private customer data is secure

Protect company servers and systems from hacking

Evaluate data processing technology

Recommend software and equipment for specific business needs, such as project m

8. Payroll audit

Payroll audits verify the accuracy of all information related to payroll processing, including:

Tax withholding

Employee hours and wages

Employee information, like address and contact information


Businesses often have human resources or administrative employees within the company who perform the

Related: What Is a Human Resources Audit? (And How To Conduct One)

9. Pay audits

Pay audits analyze pay data related to a team of employees to determine any inequalities among gender,

Related: What Is a Corporate Audit? (And Why Is It Important?)

10. Integrated audits

Integrated audits deal primarily with how an organization monitors and controls its financial accounting and

11. Forensic audit

Forensic audits are highly technical audits often conducted as part of a criminal or civil investigation. Forensic audit

12. Statutory audit

Statutory audits are audits conducted to comply with government regulations for public companies, banks,

Bank statements

Number of clients or customers

Investment earnings

Many government agencies undergo statutory audits and make the findings available to the public, which

13. Value-for-money audit

Value-for-money audits are often implemented in nonprofit organizations to assess resource management

Economy: Auditors review how companies acquire and distribute resources.

Effectiveness: Value-for-money audits evaluate how effective organizations are at

Efficiency: Auditors analyze the efficiency of a company's processes and systems.

For example, an auditor may discover a home-building charity that's overpaying for supplies. The auditor m

14. Agreed-upon procedures audit

During an agreed-upon procedures (AUP) audit, the parties requesting the audit and the party or parties c
Companies can also use AUP audits to learn more about a company they want to merge with or acquire. I

15. Special audits

Special audits are typically internal audits that focus on a narrow function or process within a company. Ow

Safety compliance

Construction

Hiring procedures

Fraud

Royalties

Taxes
See how your salary compares
Get personalized salary insights with the Indeed Salary Calculator

The importance of audits for businesses


Audits play a crucial role in ensuring the financial health and compliance of any business. By conducting re

In some industries, such as healthcare and finance, audits are a mandatory process to comply with regula
accounting rules and standards that determine how accounting events should be reported in your business's financial statements.

nerally accepted standards for financial reporting in the United States. IFRS stands for International Financial Reporting Standar
ciples-based approach.

more flexibility in the valuation of assets.

ally and is better for companies that operate in multiple countries, while GAAP is more focused on the US and is better for comp

use the US government has not adopted it as the official accounting standard. The US instead uses its own set of Generally Ac

. Under GAAP, inventory must be valued at the lower of cost or market value, while IFRS requires inventory to be valued at the

GAAP
The generally accepted accounting principles (GAAP) are a set of accounting rules, standards, and procedures issu
What are the 4 basic principles of GAAP?

What Are The 4 GAAP Principles?

The Cost Principle. The first principle of GAAP is 'cost'. ...

The Revenues Principle. The second principle of GAAP is 'revenues'. ...

The Matching Principle. The third principle of GAAP is 'matching'. ...

The Disclosure Principle. ...

y, such as financial records. There are different categories of audits, and companies can perform them internally or hire an external organi

make corrective recommendations. Other audits check for noncompliance or wrongdoing. Depending on the type of audit, a bus
th specific objectives that auditors meet before they move on to the next phase. Here are the typical phases of an audit:

nd objectives of the audit, identifying the resources and personnel required to complete the audit and

ks associated with the areas under audit. They identify and assess the likelihood of fraud, errors or m

ence to determine the effectiveness of controls, accuracy of financial statements and completion of c

management and stakeholders, including any deficiencies or areas that require improvement.

gress of corrective actions in response to the audit findings and verify the identification and resolutio

ts. This type of audit can help executives and stakeholders get an accurate understanding of a company's health. Company ow

, conduct external audits. Auditors adhere to the Generally Accepted Auditing Standards (GAAS) when handling a company's in

or ways to improve inventory management, recruit salespeople and market products.

mpany's tax returns is accurate, ensure tax payments are correct and confirm the proper reporting of tax liabilities. Agents will a

company. The IRS chooses companies to audit each year based on a variety of data.
s are responsible for verifying a company's records, including expenses, revenue, investments and assets. They usually compi

erations, including policies, procedures, goals, philosophies and culture. Usually conducted internally, this type of audit seeks to

hain to identify ways to reduce costs and streamline product delivery procedures.

nal and external regulations, which may include company standards, local regulations and state and federal laws.

tions, ensure product quality and minimize risks. For instance, a factory manager may commission quarterly compliance audits

e you're using best practices for systems management and security. Companies in software, IT and other tech industries rely on

eeds, such as project management

g, including:
e company who perform these audits. They ensure that the business has the most up-to-date employee information and that th

inequalities among gender, race, age or religion. Auditors compare a company's wages to that of similar companies to ensure t

s its financial accounting and reporting and are required for certain companies. Auditors adhere to strict guidelines developed by

il investigation. Forensic auditors apply both accounting knowledge and investigative procedures. Some may use the results of these audit

or public companies, banks, investment firms and insurance companies. They're generally external audits that verify certain fina

ailable to the public, which improves transparency and public trust.

sess resource management and operations. These audits specifically study:

bute resources.

e organizations are at using their resources to meet their overall financial and operational goals.

ocesses and systems.

g for supplies. The auditor might recommend that the company research alternate suppliers, helping them redistribute funds to

dit and the party or parties conducting the audit agree to certain terms. Companies typically use AUP audits to evaluate a specif
t to merge with or acquire. In AUP audit reports, auditors share objective information rather than recommendations or opinions.

ocess within a company. Owners, shareholders or upper-level management may authorize special audits. Sometimes a specia

y business. By conducting regular audits, teams can identify potential risks, improve operational efficiency and maintain transpa

ocess to comply with regulatory requirements. Even in industries where audits are not required by law, they're still a best practi
financial statements.

Financial Reporting Standards, which are a set of internationally accepted accounting standards used by most of the world’s co

he US and is better for companies that only operate in the US.

its own set of Generally Accepted Accounting Principles (GAAP). The US government has indicated that it is considering adop

nventory to be valued at the lower of cost or net realizable value. Additionally, GAAP does not allow for any inventory write-dow

ards, and procedures issued and frequently revised by the Financial Accounting Standards Board (FASB)
nally or hire an external organization to conduct them. Auditors review and report on a department, process, policy or function within a co

g on the type of audit, a business may share the results with company owners or government agencies.
l phases of an audit:

complete the audit and developing a plan for conducting it.

od of fraud, errors or misstatements in financial statements or other key areas.

nts and completion of compliance requirements.

improvement.

ntification and resolution of issues.

mpany's health. Company owners or shareholders typically commission an internal audit, which may focus on the following types

hen handling a company's information. External audits can be more official than internal audits and are often used to demonstra

of tax liabilities. Agents will access a company's complete financial records and may conduct tax audits on-site, over the phone
assets. They usually compile this information into a final determination for investors or shareholders.

y, this type of audit seeks to identify inefficiencies and make recommendations to reduce costs, streamline processes and impro

d federal laws.

quarterly compliance audits to ensure employees follow safety guidelines for using and maintaining equipment, cleaning facilitie

other tech industries rely on information system audits to:


oyee information and that they're receiving the appropriate pay.

milar companies to ensure the payroll data is comparable. Reviewing this information can help the company remain competitive

trict guidelines developed by the Public Company Accounting Oversight Board (PCAOB) when conducting these audits. They id

y use the results of these audits as evidence in legal proceedings or to resolve disagreements between corporations or company sharehold

audits that verify certain financial reports are accurate and compliant, including:

operational goals.

g them redistribute funds to other divisions of the charity.

P audits to evaluate a specific process or procedure and they only share the results with the parties named in the agreement. F
commendations or opinions.

audits. Sometimes a special audit is the result of a specific allegation of fraud or misconduct. Special audits may investigate:

ciency and maintain transparency with stakeholders. Audits can also help teams detect and prevent fraud, errors and other irre

aw, they're still a best practice for maintaining good corporate governance and minimizing risk.
ed by most of the world’s countries. The key differences between GAAP and IFRS include:

d that it is considering adopting IFRS, but has yet to do so.

for any inventory write-downs, whereas IFRS does. Lastly, GAAP requires that inventory be valued using a specific cost flow a

Board (FASB) . Public companies in the U.S. must follow GAAP when their accountants compile their financial statem
, policy or function within a company.
focus on the following types of investigations:

are often used to demonstrate the reliability of a company's financial and operational records.

dits on-site, over the phone or digitally. A tax audit is an external audit because the agent works for an outside entity and is unre
amline processes and improve policies.

equipment, cleaning facilities and taking appropriate breaks.


company remain competitive to recruit employees and make improvements regarding employees' wages if necessary.

ducting these audits. They identify and evaluate how a company oversees transactions, financial processes and operations.

orations or company shareholders. For example, an anti-fraud agency may investigate an investment company to verify the legal managem

named in the agreement. For example, an organization executive may decide to audit how the product development division us
al audits may investigate:

fraud, errors and other irregularities that can harm their reputation and financial stability. Additionally, audits provide valuable i
d using a specific cost flow assumption (such as FIFO or LIFO) while IFRS does not.

mpile their financial statements.


an outside entity and is unrelated to the business they're auditing.
ages if necessary.

ocesses and operations.

ny to verify the legal management of all corporate and client assets.

duct development division uses its resources.


ly, audits provide valuable insights into a company's financial and operational performance, which can inform strategic decision
an inform strategic decision-making and help to identify areas for improvement.

You might also like