Professional Documents
Culture Documents
ANS: -
THE BASIC CHARACTERISTICS OF SQL ARE: -
1) EASY TO LEARN: -
SQL is an extremely practical and user-friendly language. Even if you
have no prior experience with technology, you can learn the basics of
the language. SQL has a syntax that is remarkably close to English,
resulting in a smooth learning curve.
3) STORED PROCEIDURES: -
A stored procedure is a piece of SQL code that you can save and
reuse any number of times. Stored Procedures are used to carry out
one or more DML operations on a database. It’s just a collection of
SQL statements that take some input in the form of arguments,
perform some work, and may or may not return a result.
4) PORTABLE LANGUAGE: -
DQL provides portability of data definitions and applications. That is,
applications can be moved from one machine to another.
7) HIGH PERFORMANCE: -
In large database systems, SQL provides performance programming
capabilities for highly transactional heavy workloads.
9) TRANSACTION: -
TCL, which supports a variety of transactions, is supported by SQL.
Transactions are logically ordered units or sequences of work that
can be completed manually by a human or automatically by a
database application. SQL commands such as COMMIT, ROLLBACK,
SAVEPOINT, and others support transactions.
10) SECURITY: -
SQL allows setting permissions in views, tables, and procedures. This
ensures the safety of data in sensitive databases. Also, constraints
can be specified in SQL. These are rules that limit the types of data
that can be entered into a table column.
Q2) Write the SQL expressions for the following queries with respect
to above tables and paste the output in the answer sheet.
1) Create five rows in the two tables. (Done).
11) List down the Emp_Name starting with the letter ‘S’.
Q3) There is a table named PEOPLE that has four
Columns:
ANS:
QUERY: -
SELECT POPULATION, COUNTRY
FROM PEOPLE
WHERE POPULATION>=100000000;
4) Update the population of India by 10%.
ANS:
QUERY: -
BEFORE QUERY: -
AFTER QYERY: -
UPDATE PEOPLE
SET POPULATION=’13526422800’
WHERE COUNTRY=’INDIA’;
5) Display the country and population more than 20 million.
ANS:
QUERY: -
SELECT POPULATION, COUNTRY
FROM PEOPLE
WHERE POPULATION>20000000;
6) List the name of all countries of continent “ASIA.”
ANS:
QUERY: -
SELECT COUNTRY, CONTINENT FROM PEOPLE WHERE
CONTINENT LIKE ‘ASIA%’;