Skip to main content

Posts

Showing posts with the label ddl

Table data Backup steps from database in SQL Management Studio

How You  can take table backup in sql database There is simple way and step shown in below youtube clip. 1.Open SQL database engine and connect it. 2.let us You want to copy data of table custtable to  table custtable_bkp where custtable_bkp does not exist in your database. 3. This clip will show the step and will create new table with data of custtable . 4. In this clip select into statement used same way you can do the same using insert into command also but insert into used if table custtable_bkp already exist with structure only not data. 5. If you want to drop or delete table you can use this command. drop table <table name> Mow after execution  drop command table will be deleted.. Thanks for watching. If you like it please subscribe

SQL Command chart its need to remember

This is SQL Command chart we read it from starting of any computer diploma which include oracle and SQL. DDL is data definition language,DML is data manipulation language ,DCL is data control language and TCL is Transaction control. TCL Include Set transaction also. DML Include Merge,call ,explain plan,and lock table command too. DDL include comment also.

Disadvantages of materialized View in SQL

Following are the Disadvantages of materialized View in SQL 1.We can not perform any DML Operations on materialized View ,but you can perform DDL Operations like DROP.The thing is here it stores the all records even if it is duplicate or non-duplicates,especially which we are using aggregate values.For example daily loads,monthly loads,yearly loads.such cases it would be very helpful storing of entire data if it is new or old. The disadvantage is takes space Can only be based on a simple Select if you require real time data. maintaining the materialized View  Logs has an overhead on the master system. 2.We can't perform DML on materialized View  because it is like snapshot or read only .it is mainly used for reporting purposes.A materialized view can be either read-only, updatable or writable. We Can't Perform DML on read-only but can Perform DML on updatable or writable. 3.On readable - we cant perform DML. on updatable- we can perform DML, we need to create the mat...

Important SQL Questions for Exam Preparation

1. Which of the following queries can you use to search for employees with the pattern 'A_B' in their names? A. SELECT last_name FROM employees WHERE last_name LIKE '%A\_B%' ESCAPE '\\'; B. SELECT last_name FROM employees WHERE last_name LIKE '%A_B%' ESCAPE; C. SELECT last_name FROM employees WHERE last_name LIKE 'A_B%' ESCAPE '%'; D. SELECT last_name FROM employees WHERE last_name LIKE '%A\_B%' ESCAPE '\'; 2. The number of records in a table emp is given by statement A. Select total(*) from emp; B. Select count(*) from emp; C. Select sum(*) from emp; D. Select total from emp; 3. Write a query to Display the Name and studentid of all Students of branch CSE and ECE in alphabetical order by name. 4. Can you use the SQL JOIN and SQL HAVING clauses in one SQL statement? A .Yes. B . No. C . It depends. D . Don't know 5. # Which four are valid Oracle constraint types? A....