Whats is SQL Database
SQL (Structured Query Language) is a standardized programming language used for managing relational databases and performing various operations on the data in them. Initially created in the 1970s, SQL is regularly used by database administrators, as well as by developers writing data integration scripts and data analysts looking to set up and run analytical queries.
The uses of SQL include modifying database table and index structures; adding, updating and deleting rows of data; and retrieving subsets of information from within a database for transaction processing and analytics applications. Queries and other SQL operations take the form of commands written as statements — commonly used SQL statements include select, add, insert, update, delete, create, alter and truncate.
Some Important Questions of SQL Database are listed Bellow :-
1. What command is used to create a table by copying the structure of another table?
Explanation:To copy only the structure, the WHERE clause of the SELECT command should contain a FALSE statement as in the following
CREATE TABLE NEWTABLE AS SELECT * FROM EXISTINGTABLE WHERE 1=2;
If the WHERE condition is true, then all the rows or rows satisfying the condition will be copied to the new table.
2. What will be the output of the following query?
SELECT REPLACE(TRANSLATE(LTRIM(RTRIM(‘!! ATHEN !!’,’!’), ‘!’), ‘AN’, ‘**’),’*’,’TROUBLE’) FROM DUAL;
3. What will be the output of the following query?
SELECT DECODE(TRANSLATE(‘A’,’1234567890′,’1111111111′), ‘1’,’YES’, ‘NO’ ); Answer :
Explanation : The query checks whether a given string is a numerical digit.
4. What does the following query do?
SELECT SAL + NVL(COMM,0) FROM EMP;
5. Which date function is used to find the difference between two dates?
6. Why does the following command give a compilation error? DROP TABLE &TABLE_NAME;
7. What is the advantage of specifying WITH GRANT OPTION in the GRANT command?
8. What is the use of the DROP option in the ALTER TABLE command?
9. What is the value of ‘comm’ and ‘sal’ after executing the following query if the initial value of ‘sal’ is 10000?
UPDATE EMP SET SAL = SAL + 1000, COMM = SAL*0.1;
10. What is the use of DESC in SQL?
Explanation: The query SELECT * FROM EMP ORDER BY ENAME DESC will display the output sorted on ENAME in descending order.
Related Link ,See once
SECURITY TOOLS -Cyber Security # 4
Security Tips – Cyber Security #3
Method Of Defence – Cyber Security #2
Computer Threats – Cyber Security #1
Cyber Security Introduction
World Wide G.K
Facts around World
History of the World
>>> CONTACT US < <<