Data Warehousing (1107) Databases (3004) JAVA Related 2673) MainFrames (975) Microsoft Related (2296) Networking (553)
Operating Systems (919) Programming (3254) SAP (2318) Testing FAQS (1674) Testing Material (252) Web Related (994)
Custom Search

What is 1000Projects

'1000projects.com' is an educational content website dedicated to finding and realizing Final Year Projects, IEEE Projects, Engineering Projects, Science Fair Projects, Project Topics, Project Ideas, Major Projects, Mini Projects, Paper Presentations, Presentation Topics, IEEE Topics, .Net Projects, Java Projects, PHP Projects, VB Projects, SQL Projects, C & DS Projects, C++ Projects, Perl Projects, ASP Projects, Delphi Projects, HTML Projects, Cold Fusion Projects, Java Script Projects, Btech Projects, BE Projects, MCA Projects, Mtech Projects, MBA Projects, Project on Software, CBSE Projects, Testing Projects, Embedded Projects, Chemistry Projects, Electronics Projects, Electrical Projects, Science Projects, Mechanical Projects, Mba project Reports, Placement papers, Sample Resumes, Entrance Exams, Technical Faq's, Puzzles, etc

how it works?

Everything on this site is submitted by the students in this professional community. You Can submit your Projects, Project Topics & Ideas to info.1000projects{at}gmail.com after you submit your project/project Idea/Abstract/Seminar Topics, These are being verified and approved by our administrator. after approval of this project/project Idea/Abstract/Seminar Topics, It can be shown on 1000projects.com so that other users can read/discuss it.The entire content on this website is Only For Educational Purpose, Non Commercial use!

Please help us/Other Users by sending projects/project Ideas/Abstracts/Seminar Topics. Thanking You!!!!!


Category Articles
The most important DDL statements in SQL are:
Added on Wed, Dec 30, 2009
CREATE TABLE - creates a new database table ALTER TABLE - alters (changes) a database table DROP TABLE - deletes a database table CREATE INDEX - creates an index (search key) DROP INDEX -... Read More
For which trigger timing can you reference the NEW and OLD qualifiers?
Added on Thu, Dec 31, 2009
1. Statement and Row 2. Statement only 3. Row only 4. Oracle Forms trigger Read More
Explain normalization with examples.
Added on Wed, Jan 13, 2010
Normalisation means refining the redundancy and maintain stablisation. there are four types of normalisation are first normal forms, second normal forms, third normal forms and fourth Normal forms. Read More
what is the difference between replace and translate functions?
Added on Wed, Jan 13, 2010
I Think here we r discussing abt SQL.Replace function is used to replace a string as well as character to another string or character,Translate function exists in ORACLE for translating single character to some other character........ Read More
What is a NOLOCK?
Added on Thu, Dec 31, 2009
©http://www.sqlauthority.com ©http://www.sqlauthority.com Using the NOLOCK query optimiser hint is generally considered good practice in order to improve concurrency on a busy system. When the NOLOCK hint is... Read More
What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?
Added on Thu, Dec 31, 2009
Specifies a search condition for a group or an aggregate. HAVING can be used only with the SELECT statement. HAVING is typically used in a GROUP BY clause. When GROUP BY is not used, HAVING behaves like a WHERE clause.... Read More
Which virtual table does a trigger use?
Added on Thu, Dec 31, 2009
List few advantages of Stored Procedure. · Stored procedure can reduced network traffic and latency, boosting application performance. · Stored procedure execution plans can be reused, staying cached in SQL Server's... Read More
How we get second highest salary in database. Please show me this coding.
Added on Wed, Jan 13, 2010
select top 1 from (select top 2 from (select salary from employee order by salary) order by salary dsc) Read More
What are the advantages and disadvantages of primary key and foreign key in SQL?
Added on Wed, Jan 13, 2010
Primary key Advantages 1) It is a unique key on which all the other candidate keys are functionally dependent Disadvantage 1) There can be more than one keys on which all the other attributes are dependent on. Foreign Key ... Read More
Difference between a equijoin and a union
Added on Wed, Jan 13, 2010
Indeed both equi join and the Union are very different. Equi join is used to establish a condition between two tables to select data from them.. eg select a.employeeid, a.employeename, b.dept_name from employeemaster a , DepartmentMaster b ... Read More
What is the STUFF function and how does it differ from the REPLACE function?
Added on Thu, Dec 31, 2009
STUFF function to overwrite existing characters. Using this syntax, STUFF(string_expression, start, length, replacement_characters), string_expression is the string that will have characters... Read More
How do SQL server 2000 and XML linked? Can XML be used to access data?
Added on Thu, Dec 31, 2009
FOR XML (ROW, AUTO, EXPLICIT) You can execute SQL queries against existing relational databases to return results as XML rather than standard rowsets. These queries can be executed directly or from within stored procedures.... Read More
Write a Query to find unique names of authors who have written books. (Using Pubs database)?
Added on Wed, Jan 13, 2010
Select distinct a.au_lname, a.au_fname from titleauthor ta inner join titles t on ta.title_id = t.title_id inner join authors a on ta.au_id = a.au_id Read More
Difference between decode and case. in which case we are using case and in which case we are using decode?
Added on Wed, Jan 13, 2010
First I will give one example using 'decode' sql>SELECT ENAME,SAL,DECODE(DEPTNO,10,'ACCOUNTING',20,'RESEARCH',30,'SALES',40,'OPERATIONS','OTHERS') "DEPARTMENTS" FROM EMP; I... Read More
What are steps required tuning this query to improve its performance?
Added on Thu, Dec 31, 2009
-Have an index on TER_MASTER.REPNO and one on ERMAST.REPNO -Be sure to get familiar with EXPLAIN PLAN. This can help you determine the execution path that Oracle takes. If you are using Cost Based Optimizer mode, then be... Read More
What is the difference among "dropping a table", "truncating a table" and "deleting all records" from a table.
Added on Thu, Dec 31, 2009
Dropping :  (Table structure  + Data are deleted), Invalidates the dependent objects ,Drops the indexes Truncating:  (Data alone deleted), Performs an automatic commit, Faster than delete Delete : (Data alone... Read More
What is bit datatype and what's the information that can be stored inside a bit column?
Added on Thu, Dec 31, 2009
Bit datatype is used to store boolean information like 1 or 0 (true or false). Untill SQL Server 6.5 bit datatype could hold either a 1 or 0 and there was no support for NULL. But from SQL Server 7.0 onwards, bit datatype ... Read More
What is the difference between @@identity and SCOPE_IDENTITY()?
Added on Wed, Jan 13, 2010
This particular issue isn't so much about doing something right or wrong, it is about understanding your options so you choose the right one. Both @@IDENTITY and SCOPE_IDENTITY() return the last identity value (primary key) that was entered by... Read More
Extent Vs Page?
Added on Wed, Dec 30, 2009
Pages are low level unit to store the exact data in sql server. Basically, the data will be stored in the mdf, ldf, ndf files. Inturn, pages are logical units available in sql server.The size of the page is 8KB. Eight... Read More
If a view on a single base table is manipulated will the changes be reflected on the base table?
Added on Thu, Dec 31, 2009
If changes are made to the tables and these tables are the base tables of a view, then the changes will be reference on the view. Read More
What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors?
Added on Thu, Dec 31, 2009
Cursors allow row-by-row prcessing of the resultsets. Types of cursors: Static, Dynamic, Forward-only, Keyset-driven. See books online for more information. ... Read More
What is denormalization and when would you go for it?
Added on Thu, Dec 31, 2009
As the name indicates, denormalization is the reverse process of normalization. It's the controlled introduction of redundancy in to the database design. It helps improve the query performance as the number of joins could ... Read More
What is the use of indexes?Explain about it?
Added on Wed, Jan 13, 2010
index are those which are used to speed up row retrieval from a table. oracle automatically creates an index for primary and unique keys. Syntax:Create index index_name ontable_name (column1_name,column2_name,.....)[no sort] Read More
What is a mutating table error and how can you get around it?
Added on Thu, Dec 31, 2009
Level: Intermediate Expected answer: This happens with triggers. It occurs because the trigger is trying to update a row it is currently using. The usual fix involves either use of views or temporary tables so the... Read More
Which function is used to find the largest integer less than or equal to a specific value?
Added on Wed, Jan 13, 2010
FLOOR (Transact-SQL) Returns the largest integer less than or equal to the specified numeric expression. Syntax: FLOOR ( numeric_expression ) Arguments: numeric_expression -> Is an expression of the exact numeric or approximate... Read More
what is the query for to select multiple columns to generate single row in the sql and how come we can bring grid views in sql for getting those datas are demolished
Added on Wed, Jan 13, 2010
i need sql & asp db2 asp.net all other interview questuions Read More
Which line in the following statement will produce an error?
Added on Thu, Dec 31, 2009
1. cursor action_cursor is 2. select name, rate, action 3. into action_record 4. from action_table; 5. There are no errors in this statement. Read More
What's the maximum size of a row?
Added on Thu, Dec 31, 2009
8060 bytes. Don't be surprised with questions like 'what is the maximum number of columns per table'. Check out SQL Server books online for the page titled: "Maximum Capacity Specifications". Read More
What is the advantage to use trigger in your PL?
Added on Wed, Jan 13, 2010
Triggers are fired implicitly on the tables/views on which they are created. There are various advantages of using a trigger. Some of them are: - Suppose we need to validate a DML statement(insert/Update/Delete) that modifies a table then we can... Read More
Where the integrity constraints are stored in data dictionary?
Added on Thu, Dec 31, 2009
The integrity constraints are stored in USER_CONSTRAINTS. Read More
How to restart SQL Server in single user mode? How to start SQL Server in minimal configuration mode?
Added on Thu, Dec 31, 2009
SQL Server can be started from command line, using the SQLSERVR.EXE. This EXE has some very important parameters with which a DBA should be familiar with. -m is used for starting SQL Server in single user mode and -f is used... Read More
Difference between Store Procedure and Trigger
Added on Wed, Jan 13, 2010
Information related to Stored procedure you can see in USER_SOURCE,USER_OBJECTS(current user) tables. Information related to triggers stored in USER_SOURCE,USER_TRIGGERS (current user) Tables. Stored procedure can't be inactive but trigger... Read More
Write short notes in XSU & java
Added on Wed, Jan 13, 2010
No answer available currently. Be the first one to reply to this question by submitting your answer from the form below.   Read More
How many LONG columns are allowed in a table? Is it possible to use LONG columns in WHERE clause or ORDER BY?
Added on Thu, Dec 31, 2009
Only one LONG column is allowed. It is not possible to use LONG column in WHERE or ORDER BY clause. Read More
Read the following code:
Added on Thu, Dec 31, 2009
10. CREATE OR REPLACE PROCEDURE find_cpt 11. (v_movie_id {Argument Mode} NUMBER, v_cost_per_ticket {argument mode} NUMBER) 12. IS 13. BEGIN 14. IF v_cost_per_ticket > 8.5 THEN 15. SELECT cost_per_ticket ... Read More
What is blocking and how would you troubleshoot it?
Added on Thu, Dec 31, 2009
Blocking happens when one connection from an application holds a lock and a second connection requires a conflicting lock type. This forces the second connection to wait, blocked on the first. Read up the following topics in... Read More
What is the default format of date in Oracle? How can I change my default date format?
Added on Wed, Jan 13, 2010
Oracle's default format for DATE is "DD- MON-YY" Read More
How to copy sql table.
Added on Wed, Jan 13, 2010
COPY FROM database TO database action - destination_table (column_name, column_name...) USING query eg copy from scott/tiger@ORCL92 - to scott/tiger@ORCL92- create new_emp ? using select * from emp; Read More
What does teh term upsizing refer to ?
Added on Wed, Jan 13, 2010
Applications that have outgrown their environment are re-engineered to run in a larger environment. This is upsizing. Read More
Advantages and disadvantages of attributes.
Added on Wed, Jan 13, 2010
.if more than one attribute has sane name then it will create the problem. 2.Attribute is the common media through which we can get the information about a entity. Read More
How can i hide a particular table name of our schema.
Added on Wed, Jan 13, 2010
you can hide the table name by creating synonyms. e.g) you can create a synonym y for table x create synonym y for x; Read More
How to display duplicate rows in a table?
Added on Wed, Jan 13, 2010
select * from emp group by (empid) having count(empid)>1 Read More
How do I write a cron which will run a SQL query and mail the results to a group?
Added on Wed, Jan 13, 2010
Use DBMS_JOB for scheduling a cron job and DBMS_MAIL to send the results throught email. Read More
What is the sub-query?
Added on Wed, Dec 30, 2009
Sub-query is a query whose return values are used in filtering conditions of the main query. Read More
What are the advantages of VIEW?
Added on Thu, Dec 31, 2009
- To protect some of the columns of a table from other users. - To hide complexity of a query. - To hide complexity of calculations. Read More
What is SQL?
Added on Thu, Dec 31, 2009
SQL stands for 'Structured Query Language'. Read More
What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?
Added on Thu, Dec 31, 2009
Triggers are special kind of stored procedures that get executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table. In SQL Server 6.5 you could define only 3 triggers per table, one for INSERT,... Read More
What is the difference between cross product & Cartesian product
Added on Wed, Jan 13, 2010
There is no difference between Cartesian product and cross join. although there syntax are different but they work as a same. Cartesian or cross product selects all rows from both the table. example tableA 6 rows tableB 6 rows Cartesian... Read More
What is a event handler
Added on Wed, Jan 13, 2010
An event handler is a routine that is written to respond to a particular event. Read More
Why does the following command give a compilation error?
Added on Wed, Dec 30, 2009
DROP TABLE &TABLE NAME; Variable names should start with an alphabet. Here the table name starts with an '&' symbol. Read More
Which system tables contain information on privileges granted and privileges obtained?
Added on Wed, Dec 30, 2009
USER_TAB_PRIVS_MADE, USER_TAB_PRIVS_RECD Read More
What is the parameter substitution symbol used with INSERT INTO command?
Added on Wed, Dec 30, 2009
What is difference between TRUNCATE & DELETE
Added on Wed, Dec 30, 2009
TRUNCATE commits after deleting entire table i.e., cannot be rolled back. Database triggers do not fire on TRUNCATE DELETE allows the filtered deletion. Deleted records can be rolled back or committed. Database triggers fire... Read More
What is the usage of SAVEPOINTS?
Added on Thu, Dec 31, 2009
SAVEPOINTS are used to subdivide a transaction into smaller parts. It enables rolling back part of a transaction. Maximum of five save points are allowed. Read More
Which Oracle supplied package can you use to output values and messages from database triggers, stored procedures and functions within SQL*Plus?
Added on Thu, Dec 31, 2009
1. DBMS_DISPLAY 2. DBMS_OUTPUT 3. DBMS_LIST 4. DBMS_DESCRIBE Read More
My SQL statement SELECT AVG(SALARY) FROM EMP yields inaccurate results. Why?
Added on Thu, Dec 31, 2009
Because SALARY is not declared to have NULLs and the employees for whom the salary is not known are also counted. Read More
How do you concatenate the FIRSTNAME and LASTNAME from EMP table to give a complete name?
Added on Thu, Dec 31, 2009
SELECT FIRSTNAME || ‘ ‘ || LASTNAME FROM EMP Read More
Difference between VARCHAR and VARCHAR2?
Added on Wed, Jan 13, 2010
Varchar means fixed length character data(size) ie., min size-1 and max-2000 Varchar2 means variable length character data ie., min-1 to max-4000 Read More
What is difference between DBMS and RDBMS?
Added on Wed, Jan 13, 2010
1.RDBMS=DBMS+Refrential Integrity 2. An RDBMS ia one that follows 12 rules of CODD. Read More
What is diffrence between Co-related sub query and nested sub query??
Added on Wed, Jan 13, 2010
Correlated subquery runs once for each row selected by the outer query. It contains a reference to a value from the row selected by the outer query. Nested subquery runs only once for the entire nesting (outer) query. It does not contain any... Read More
What is join in sql?
Added on Wed, Jan 13, 2010
JOIN is the form of SELECT command that combines info from two or more tables. Types of Joins are Simple (Equijoin & Non-Equijoin), Outer & Self join. Equijoin returns rows from two or more tables joined together based upon a equality... Read More
What are the types of processes that a server runs ?
Added on Wed, Jan 13, 2010
Foreground process and Background process. Read More
SELECT statements:
Added on Wed, Dec 30, 2009
SELECT column_name(s) FROM table_name SELECT DISTINCT column_name(s) FROM table_name SELECT column FROM table WHERE column operator value SELECT column FROM table WHERE column LIKE pattern SELECT column,SUM(column)... Read More
What is the use of CASCADE CONSTRAINTS?
Added on Wed, Dec 30, 2009
When this clause is used with the DROP command, a parent table can be dropped even when a child table exists. Read More
What will be the output of the following query?
Added on Wed, Dec 30, 2009
SELECT REPLACE(TRANSLATE(LTRIM(RTRIM('!! ATHEN !!','!'), '!'), 'AN', '**'),'*','TROUBLE') FROM DUAL;? Read More
What does the following query do?
Added on Wed, Dec 30, 2009
SELECT SAL + NVL(COMM,0) FROM EMP;? This displays the total salary of all employees. The null values in the commission column will be replaced by 0 and added to salary. Read More
What is the value of comm and sal after executing the following query if the initial value of ‘sal’ is 10000
Added on Wed, Dec 30, 2009
UPDATE EMP SET SAL = SAL + 1000, COMM = SAL*0.1;? sal = 11000, comm = 1000. Read More
What's an SQL injection?
Added on Wed, Dec 30, 2009
SQL Injection is when form data contains an SQL escape sequence and injects a new SQL query to be run. Read More
What is the fastest way of accessing a row in a table?
Added on Thu, Dec 31, 2009
Using ROWID. CONSTRAINTS Read More
What is ON DELETE CASCADE?
Added on Thu, Dec 31, 2009
When ON DELETE CASCADE is specified Oracle maintains referential integrity by automatically removing dependent foreign key values if a referenced primary or unique key value is removed. Read More
What is difference between CHAR and VARCHAR2? What is the maximum SIZE allowed for each type?
Added on Thu, Dec 31, 2009
CHAR pads blank spaces to the maximum length. VARCHAR2 does not pad blank spaces. Page 4 For CHAR the maximum length is 255 and 2000 for VARCHAR2. Read More
What is CYCLE/NO CYCLE in a Sequence?
Added on Thu, Dec 31, 2009
CYCLE specifies that the sequence continue to generate values after reaching either maximum or minimum value. After pan-ascending sequence reaches its maximum value, it generates its minimum value. After a descending... Read More
Which three of the following are implicit cursor attributes?
Added on Thu, Dec 31, 2009
1. %found 2. %too_many_rows 3. %notfound 4. %rowcount 5. %rowtype Read More
Procedure and Functions are explicitly executed. This is different from a database trigger. When is a database trigger executed?
Added on Thu, Dec 31, 2009
1. When the transaction is committed 2. During the data manipulation statement 3. When an Oracle supplied package references the trigger 4. During a data manipulation statement and when the transaction is committed... Read More
Examine this code:1
Added on Thu, Dec 31, 2009
71. BEGIN 72. theater_pck.v_total_seats_sold_overall := theater_pck.get_total_for_year; 73. END; For this code to be successful, what must be true? 1. Both the V_TOTAL_SEATS_SOLD_OVERALL variable and the... Read More
How to Select last N records from a Table?
Added on Thu, Dec 31, 2009
select * from (select rownum a, CLASS_CODE,CLASS_DESC from clm) where a > ( select (max (rownum)-10) from clm) Here N = 10 The following query has a Problem of performance in the execution of the following query... Read More
You want to determine the location of identical rows in a table before attempting to place a unique index on the table, how can this be done?
Added on Thu, Dec 31, 2009
Level: High Expected answer: Oracle tables always have one guaranteed unique column, the rowid column. If you use a min/max function against your rowid and then select against the proposed primary key you can squeeze out the... Read More
What is User Defined Functions?
Added on Thu, Dec 31, 2009
User-Defined Functions allow to define its own T-SQL functions that can accept 0 or more parameters and return a single scalar data value or a table data type. Read More
Using query analyzer, name 3 ways to get an accurate count of the number of records in a table?
Added on Thu, Dec 31, 2009
SELECT * FROM table1 SELECT COUNT(*) FROM table1 SELECT rows FROM sysindexes WHERE id = OBJECT_ID(table1) AND indid < 2 Read More
What is Self Join?
Added on Thu, Dec 31, 2009
This is a particular case when one table joins to itself, with one or two aliases to avoid confusion. A self join can be of any type, as long as the joined tables are the same. A self join is rather unique in that it ... Read More
What does the following query do? SELECT SAL + NVL(COMM,0) FROM EMP;
Added on Wed, Jan 13, 2010
This displays the total salary of all employees. The null values in the commission column will be replaced by 0 and added to salary. Read More
How to delete same id in rows? For example empid=5 repeated for times in rows. How to delete which sql query is used?
Added on Wed, Jan 13, 2010
we can use distinct clause for this type of query.distinct clause is used to remove duplicates from table like select rowid distinct from table name Read More
How to find second maximum value from a table?
Added on Wed, Jan 13, 2010
select max(field1) from tname1 where field1=(select max(field1) from tname1 where field1<(select max(field1) from tname1); Field1- Salary field Tname= Table name. Read More
What are the wildcards used for pattern matching.
Added on Wed, Jan 13, 2010
_ for single character substitution and % for multi-character substitution. Read More
Why do we use cache and no cache in sequences? What is the benefit we have in using them?
Added on Wed, Jan 13, 2010
Cache is a special kind of memory. It is used for faster access. Cache has memory allocations and is used for variables or functions that are frequently called for. the cache has limited allocations and thus it is easier to search in cache... Read More
The INSERT INTO Statements:
Added on Wed, Dec 30, 2009
INSERT INTO table_name VALUES (value1, value2,....) INSERT INTO table_name (column1, column2,...) VALUES (value1, value2,....) Read More
What operator tests column for the absence of data?
Added on Wed, Dec 30, 2009
IS NULL operator. Read More
What are the wildcards used for pattern matching.?
Added on Wed, Dec 30, 2009
_ for single character substitution and % for multi-character substitution. Read More
What is a join? Explain the different types of joins?
Added on Wed, Dec 30, 2009
Join is a query, which retrieves related columns or rows from multiple tables. Self Join - Joining the table with itself. Equi Join - Joining two tables by equating two common columns. Non-Equi Join - Joining two... Read More
What is correlated sub-query?
Added on Wed, Dec 30, 2009
Correlated sub-query is a sub-query, which has reference to the main query. Read More
Explain CONNECT BY PRIOR?
Added on Wed, Dec 30, 2009
Retrieves rows in hierarchical order eg. select empno, ename from emp where. Read More
Difference between SUBSTR and INSTR?
Added on Wed, Dec 30, 2009
INSTR (String1, String2 (n, (m)), INSTR returns the position of the m-th occurrence of the string 2 in string1. The search begins from nth position of string1. SUBSTR (String1 n, m) SUBSTR returns a character... Read More
Which of the following statements is true about implicit cursors?
Added on Thu, Dec 31, 2009
1. Implicit cursors are used for SQL statements that are not named. 2. Developers should use implicit cursors with great care. 3. Implicit cursors are used in cursor for loops to handle data processing. 4. Implicit... Read More
A developer would like to use referential datatype declaration on a variable. The variable name is EMPLOYEE_LASTNAME, and the corresponding table and column is EMPLOYEE, and LNAME, respectively. How would the developer define this variable using refe
Added on Thu, Dec 31, 2009
respectively. How would the developer define this variable using referential datatypes? 1. Use employee.lname%type. 2. Use employee.lname%rowtype. 3. Look up datatype for EMPLOYEE column on LASTNAME table and use that. ... Read More
A stored function must return a value based on conditions that are determined at runtime. Therefore, the SELECT statement cannot be hard-coded and must be created dynamically when the function is executed. Which Oracle supplied package will enable th
Added on Thu, Dec 31, 2009
Therefore, the SELECT statement cannot be hard-coded and must be created dynamically when the function is executed. Which Oracle supplied package will enable this feature? 1. DBMS_DDL 2. DBMS_DML 3. DBMS_SYN ... Read More
Difference between a "where" clause and a "having" clause.
Added on Thu, Dec 31, 2009
Having clause is used only with group functions whereas Where is not used with. Read More
How to determine the service pack currently installed on SQL Server?
Added on Thu, Dec 31, 2009
The global variable @@Version stores the build number of the sqlservr.exe, which is used to determine the service pack installed. To know more about this process visit SQL Server service packs and versions. Read More
What are different normalization forms?
Added on Thu, Dec 31, 2009
1NF: Eliminate Repeating Groups Make a separate table for each set of related attributes, and give each table a primary key. Each field contains at most one value from its attribute domain. 2NF: Eliminate Redundant... Read More
What is the output of the following query SELECT TRUNC(1234.5678,-2) FROM DUAL;
Added on Wed, Jan 13, 2010
1200. Read More
What will be the output of the following query? SELECT DECODE(TRANSLATE('A','1234567890','1111111111'), '1','YES', 'NO' );
Added on Wed, Jan 13, 2010
NO. Explanation : The query checks whether a given string is a numerical digit. Read More
What will be the output of the following query? SELECT REPLACE(TRANSLATE(LTRIM(RTRIM('!! ATHEN !!','!'), '!'), 'AN', '**'),'*','TROUBLE') FROM DUAL;
Added on Wed, Jan 13, 2010
step by step i will explain: 1st step : rtrim('!!athen!!','!') its out put come like this "!!athen" 2nd step: ltrim('!!athen','!') its out put come "athen" 3rd step :trancelate('athen','an&... Read More
If Delete Any Table In Back-End Then
Added on Wed, Jan 13, 2010
Question : If Delete Any Table In Back-End Then What Are The Triggers will Fire Automatically (Those Triggers Are Back-End Triggers Only)  Answers: Oracle has Schema triggers (CREATE OR REPLACE TRIGGER ... ON SCHEMA ... Read More
There are 2 tables, Employee and Department. There are few records in employee table, for which, the department is not assigned. The output of the query should contain all th employees names and their corresponding departments, if the department is a
Added on Wed, Jan 13, 2010
What you want to use here is called a left outer join with Employee table on the left side. A left outer join as the name says picks up all the records from the left table and based on the joint column picks the matching records from the right table... Read More
What is the difference between Single row sub-Query and Scalar sub-Query
Added on Wed, Jan 13, 2010
SINGLE ROW SUBQUERY RETURNS A VALUE WHICH IS USED BY WHERE CLAUSE , WHEREAS SCALAR SUBQUERY IS A SELECT STATEMENT USED IN COLUMN LIST CAN BE THOUGHT OF AS AN INLINE FUNCTION IN SELECT COLUMN LIST Read More
What is Mutating Table?
Added on Wed, Jan 13, 2010
Mutating Table is a table that is currently being modified by an Insert, Update or Delete statement. Constraining Table is a table that a triggering statement might need to read either directly for a SQL statement or indirectly for a declarative... Read More
The Delete Statements:
Added on Wed, Dec 30, 2009
DELETE FROM table_name WHERE column_name = some_value Delete All Rows: DELETE FROM table_name or DELETE * FROM table_name Read More
BETWEEN ... AND
Added on Wed, Dec 30, 2009
SELECT column_name FROM table_name WHERE column_name BETWEEN value1 AND value2 The values can be numbers, text, or dates. Read More
What are the privileges that can be granted on a table by a user to others?
Added on Wed, Dec 30, 2009
Insert, update, delete, select, references, index, execute, alter, all. Read More
What is the use of DESC in SQL?
Added on Wed, Dec 30, 2009
DESC has two purposes. It is used to describe a schema as well as to retrieve rows from table in descending order. Explanation : The query SELECT * FROM EMP ORDER BY ENAME DESC will display the output sorted on ENAME ... Read More
Explain UNION, MINUS, UNION ALL and INTERSECT?
Added on Thu, Dec 31, 2009
INTERSECT - returns all distinct rows selected by both queries. MINUS - returns all distinct rows selected by the first query but not by the second. UNION - returns all distinct rows selected by either query UNION... Read More
Which procedure can be used to create a customized error message?
Added on Thu, Dec 31, 2009
1. RAISE_ERROR 2. SQLERRM 3. RAISE_APPLICATION_ERROR 4. RAISE_SERVER_ERROR Read More
Define candidate key, alternate key, composite key.
Added on Thu, Dec 31, 2009
A candidate key is one that can identify each row of a table uniquely. Generally a candidate key becomes the primary key of the table. If the table has more than one candidate key, one of them will become the primary key,... Read More
What is a self join? Explain it with an example.
Added on Thu, Dec 31, 2009
Self join is just like any other join, except that two instances of the same table will be joined in the query. Here is an example: Employees table which contains rows for normal employees as well as managers. So, to find... Read More
Difference between Function and Stored Procedure?
Added on Thu, Dec 31, 2009
UDF can be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section where as Stored procedures cannot be. UDFs that return tables can be treated as another rowset. This can be used in JOINs with other tables. ... Read More
Where are SQL server users names and passwords are stored in sql server?
Added on Thu, Dec 31, 2009
They get stored in master db in the sysxlogins table. Read More
What is a table called, if it does not have neither Cluster nor Non-cluster Index? What is it used for?
Added on Thu, Dec 31, 2009
Unindexed table or Heap. Microsoft Press Books and Book On Line (BOL) refers it as Heap. A heap is a table that does not have a clustered index and, therefore, the pages are not linked by pointers. The IAM pages are the only... Read More
What is Cross Join?
Added on Thu, Dec 31, 2009
A cross join that does not have a WHERE clause produces the Cartesian product of the tables involved in the join. The size of a Cartesian product result set is the number of rows in the first table multiplied by the number... Read More
What is OLTP(OnLine Transaction Processing)?
Added on Thu, Dec 31, 2009
In OLTP - online transaction processing systems relational database design use the discipline of data modeling and generally follow the Codd rules of data normalization in order to ensure absolute data integrity. Using these... Read More
What is a default TCP/IP socket assigned for SQL Server?
Added on Wed, Jan 13, 2010
1433 is default tcp/ip socket sql server. Read More
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;
Added on Wed, Jan 13, 2010
sal = 11000, comm = 1000. Read More
There is a eno & gender in a table. Eno has primary key and gender has a check constraints for the values 'M' and 'F'.
Added on Wed, Jan 13, 2010
Question : There is a eno & gender in a table. Eno has primary key and gender has a check constraints for the values 'M' and 'F'. While inserting the data into the table M was misspelled as F and F as M. What is... Read More
Cursor Syntax brief history
Added on Wed, Jan 13, 2010
To retrieve data with SQL one row at a time you need to use cursor processing.Not all relational databases support this, but many do.Here I show this in Oracle with PL/SQL, which is Procedural Language SQL.Cursor processing is done in several... Read More
What is denormalization and difference between normalization and denormalization?
Added on Wed, Jan 13, 2010
Denormalization is the process of attempting to optimize the performance of a database by adding redundant data or by grouping data. Normalization is the process of de-composing a relation with anomalies into a well structured relation. Read More
What is DML,DDL?
Added on Wed, Jan 13, 2010
Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples: CREATE - to create objects in the database ALTER - alters the structure of the database DROP - delete objects from the database ... Read More
What is difference between Oracle and MS Access?
Added on Wed, Jan 13, 2010
Question : What is difference between Oracle and MS Access? What are disadvantages in Oracle and MS Access? What are features & advantages in Oracle and MS Access?                 ... Read More
What is correlated subquery?
Added on Wed, Jan 13, 2010
Correlated Subquery is a subquery that is evaluated once for each row processed by the parent statement. Parent statement can be Select, Update or Delete. Use CRSQ to answer multipart questions whose answer depends on the value in each row processed... Read More
Explain about XML related specifications?
Added on Wed, Jan 13, 2010
XML is a very powerful DOM language. Often this language is used with many database applications as a front end, SQL acts as a backend to support the Database queries. This specification has several extensions which defines routines, functions,... Read More
In a Client/Server context, what does API (Application Programming Interface) refer to
Added on Wed, Jan 13, 2010
An API, in a Client/ Server context, is a specification of a set of functions for communication between the client and the server. Read More
Operators used in SELECT statements.
Added on Wed, Dec 30, 2009
= Equal <> or != Not equal > Greater than < Less than >= Greater than or equal <= Less than or equal BETWEEN Between an inclusive range LIKE Search for a pattern Read More
The SELECT INTO Statement is most often used to create backup copies of tables or for archiving records.
Added on Wed, Dec 30, 2009
SELECT column_name(s) INTO newtable [IN externaldatabase] FROM source SELECT column_name(s) INTO newtable [IN externaldatabase] FROM source WHERE column_name operator value Read More
The Update Statement:
Added on Wed, Dec 30, 2009
UPDATE table_name SET column_name = new_value WHERE column_name = some_value Read More
Sort the Rows:
Added on Wed, Dec 30, 2009
SELECT column1, column2, ... FROM table_name ORDER BY columnX, columnY, .. SELECT column1, column2, ... FROM table_name ORDER BY columnX DESC SELECT column1, column2, ... FROM table_name ORDER BY columnX DESC, columnY ASC Read More
The IN operator may be used if you know the exact value you want to return for at least one of the columns.
Added on Wed, Dec 30, 2009
SELECT column_name FROM table_name WHERE column_name IN (value1,value2,..) Read More
Which system table contains information on constraints on all the tables created?obtained?
Added on Wed, Dec 30, 2009
USER_CONSTRAINTS. Read More
State true or false. !=, <>, ^= all denote the same operation?
Added on Wed, Dec 30, 2009
True. Read More
State true or false. EXISTS, SOME, ANY are operators in SQL?
Added on Wed, Dec 30, 2009
True. Read More
What is the advantage of specifying WITH GRANT OPTION in the GRANT command?
Added on Wed, Dec 30, 2009
The privilege receiver can further grant the privileges he/she has obtained from the owner to any other user. Read More
Which command executes the contents of a specified file?
Added on Wed, Dec 30, 2009
START or @. Read More
Which command displays the SQL command in the SQL buffer, and then executes it?
Added on Wed, Dec 30, 2009
RUN. Read More
What command is used to get back the privileges offered by the GRANT command?
Added on Wed, Dec 30, 2009
REVOKE. Read More
What will be the output of the following query? SELECT DECODE(TRANSLAT TRANSLATE
Added on Wed, Dec 30, 2009
('A','1234567890','1111111111'), '1','YES', 'NO' );? NO. Explanation : The query checks whether a given string is a numerical digit. Read More
Which date function is used to find the difference between two dates?
Added on Wed, Dec 30, 2009
MONTHS_BETWEEN. Read More
What operator performs pattern matching?
Added on Wed, Dec 30, 2009
LIKE operator. Read More
What is the use of the DROP option in the ALTER TABLE command?
Added on Wed, Dec 30, 2009
It is used to drop constraints specified on the table. Read More
. Which function is used to find the largest integer less than or equal to a specific value?
Added on Wed, Dec 30, 2009
FLOOR. Read More
Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?
Added on Wed, Dec 30, 2009
Data Definition Language (DDL). Read More
What command is used to create a table by copying the structure of another table?
Added on Wed, Dec 30, 2009
CREATE TABLE .. AS SELECT command 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... Read More
TRUNCATE TABLE EMP;DELETE FROM EMP;
Added on Wed, Dec 30, 2009
Will the outputs of the above two commands differ? Both will result in deleting all the rows in the table EMP.. Read More
What is the output of the following query SELECT TRUNC(1234.5678,-2) FROM DUAL;?
Added on Wed, Dec 30, 2009
1200. Read More
What is ROWID?
Added on Thu, Dec 31, 2009
ROWID is a pseudo column attached to each row of a table. It is 18 characters long, blockno, rownumber are the components of ROWID. Read More
What is an integrity constraint?
Added on Thu, Dec 31, 2009
Integrity constraint is a rule that restricts values to a column in a table. Read More
What is referential integrity constraint?
Added on Thu, Dec 31, 2009
Maintaining data integrity through a set of rules that restrict the values of one or more columns of the tables based on the values of primary key or unique key of the referenced table. Read More
What are the data types allowed in a table?
Added on Thu, Dec 31, 2009
CHAR, VARCHAR2, NUMBER, DATE, RAW, LONG and LONG RAW. Read More
What are the pre-requisites to modify datatype of a column and to add a column with NOT NULL constraint?
Added on Thu, Dec 31, 2009
- To modify the datatype of a column the column must be empty. - To add a column with NOT NULL constrain, the table must be empty. Read More
How will you activate/deactivate integrity constraints?
Added on Thu, Dec 31, 2009
The integrity constraints can be enabled or disabled by ALTER TABLE ENABLE CONSTRAINT / DISABLE CONSTRAINT. Read More
If unique key constraint on DATE column is created, will it validate the rows that are inserted with SYSDATE?
Added on Thu, Dec 31, 2009
It won't, Because SYSDATE format contains time attached with it. Read More
What is a database link?
Added on Thu, Dec 31, 2009
Database link is a named path through which a remote database can be accessed. Read More
How to access the current value and next value from a sequence? Is it possible to access the current value in a session before accessing next value?
Added on Thu, Dec 31, 2009
Sequence name CURRVAL, sequence name NEXTVAL. It is not possible. Only if you access next value in the session, current value can be accessed. Read More
Can a view be updated/inserted/deleted? If Yes - under what conditions?
Added on Thu, Dec 31, 2009
A View can be updated/deleted/inserted if it has only one base table if the view is based on columns from one or more tables then insert, update and delete is not possible. Read More
Which of the following is not a feature of a cursor FOR loop?
Added on Thu, Dec 31, 2009
1. Record type declaration. 2. Opening and parsing of SQL statements. Page 5 3. Fetches records from cursor. 4. Requires exit condition to be defined. Read More
If left out, which of the following would cause an infinite loop to occur in a simple loop?
Added on Thu, Dec 31, 2009
1. LOOP 2. END LOOP 3. IF-THEN 4. EXIT Read More
The command used to open a CURSOR FOR loop is
Added on Thu, Dec 31, 2009
1. open 2. fetch 3. parse 4. None, cursor for loops handle cursor opening implicitly. Read More
What happens when rows are found using a FETCH statement
Added on Thu, Dec 31, 2009
1. It causes the cursor to close 2. It causes the cursor to open 3. It loads the current row values into variables 4. It creates the variables to hold the current row values Read More
What is the maximum number of handlers processed before the PL/SQL block is exited when an exception occurs?
Added on Thu, Dec 31, 2009
1. Only one 2. All that apply 3. All referenced 4. None Read More
Read the following code:1
Added on Thu, Dec 31, 2009
22. CREATE OR REPLACE TRIGGER update_show_gross 23. {trigger information} 24. BEGIN 25. {additional code} 26. END; The trigger code should only execute when the column, COST_PER_TICKET, is greater than $3. ... Read More
Read the following code:2
Added on Thu, Dec 31, 2009
CREATE OR REPLACE FUNCTION get_budget(v_studio_id IN NUMBER) RETURN number IS v_yearly_budget NUMBER; BEGIN SELECT yearly_budget INTO v_yearly_budget FROM studio WHERE id = v_studio_id; RETURN... Read More
When invoking this procedure, you encounter the error: ORA-000:Unique constraint(SCOTT.THEATER_NAME_UK) violated. How should you modify the function to handle this error?
Added on Thu, Dec 31, 2009
1. An user defined exception must be declared and associated with the error code and handled in the EXCEPTION section. 2. Handle the error in EXCEPTION section by referencing the error code directly. 3. Handle the... Read More
Read the following code:3
Added on Thu, Dec 31, 2009
40. CREATE OR REPLACE PROCEDURE calculate_budget IS 41. v_budget studio.yearly_budget%TYPE; 42. BEGIN 43. v_budget := get_budget(11); 44. IF v_budget < 30000 45. THEN 46. set_budget(11,30000000); ... Read More
The CHECK_THEATER trigger of the THEATER table has been disabled. Which command can you issue to enable this trigger?
Added on Thu, Dec 31, 2009
1. ALTER TRIGGER check_theater ENABLE; 2. ENABLE TRIGGER check_theater; 3. ALTER TABLE check_theater ENABLE check_theater; 4. ENABLE check_theater; Read More
Examine this database trigger
Added on Thu, Dec 31, 2009
52. CREATE OR REPLACE TRIGGER prevent_gross_modification 53. {additional trigger information} 54. BEGIN 55. IF TO_CHAR(sysdate, DY) = MON 56. THEN 57. RAISE_APPLICATION_ERROR(-20000,Gross receipts cannot be... Read More
This trigger must fire before each DELETE of the GROSS_RECEIPT table. It should fire only once for the entire DELETE statement. What additional information must you add?
Added on Thu, Dec 31, 2009
1. BEFORE DELETE ON gross_receipt 2. AFTER DELETE ON gross_receipt 3. BEFORE (gross_receipt DELETE) 4. FOR EACH ROW DELETED FROM gross_receipt Read More
Examine this function:
Added on Thu, Dec 31, 2009
61. CREATE OR REPLACE FUNCTION set_budget 62. (v_studio_id IN NUMBER, v_new_budget IN NUMBER) IS 63. BEGIN 64. UPDATE studio 65. SET yearly_budget = v_new_budget WHERE id = v_studio_id; IF SQL%FOUND THEN ... Read More
Which code must be added to successfully compile this function?
Added on Thu, Dec 31, 2009
1. Add RETURN right before the IS keyword. 2. Add RETURN number right before the IS keyword. 3. Add RETURN boolean right after the IS keyword. 4. Add RETURN boolean right before the IS keyword. Read More
Under which circumstance must you recompile the package body after recompiling the package specification?
Added on Thu, Dec 31, 2009
1. Altering the argument list of one of the package constructs 2. Any change made to one of the package constructs 3. Any SQL statement change made to one of the package constructs 4. Removing a local variable from the... Read More
What occurs if a procedure or function terminates with failure without being handled?
Added on Thu, Dec 31, 2009
1. Any DML statements issued by the construct are still pending and can be committed or rolled back. 2. Any DML statements issued by the construct are committed 3. Unless a GOTO statement is used to continue processing... Read More
How to implement ISNUMERIC function in SQL *Plus ?
Added on Thu, Dec 31, 2009
Method 1: Select length (translate(trim (column_name),'+-.0123456789',''))from dual; Will give you a zero if it is a number or greater than zero if not numeric (actually gives the count of non... Read More
What is the difference between Truncate and Delete interms of Referential Integrity?
Added on Thu, Dec 31, 2009
DELETE removes one or more records in a table, checking referential Constraints (to see if there are dependent child records) and firing any DELETE triggers. In the order you are deleting (child first then parent) There will... Read More
Describe the use of %ROWTYPE and %TYPE in PL/SQL
Added on Thu, Dec 31, 2009
Level: Low Expected answer: %ROWTYPE allows you to associate a variable with an entire table row. The %TYPE associates a variable with a single column type. Read More
What packages (if any) has Oracle provided for use by developers?
Added on Thu, Dec 31, 2009
Oracle provides the DBMS_ series of packages. There are many which developers should be aware of such as DBMS_SQL, DBMS_PIPE, DBMS_TRANSACTION, DBMS_LOCK, DBMS_ALERT, DBMS_OUTPUT, DBMS_JOB... Read More
Describe the use of PL/SQL tables
Added on Thu, Dec 31, 2009
PL/SQL tables are scalar arrays that can be referenced by a binary integer. They can be used to hold values for use in later queries or calculations. In Oracle 8 they will be able to be of the %ROWTYPE... Read More
When is a declare statement needed ?
Added on Thu, Dec 31, 2009
The DECLARE statement is used in PL/SQL anonymous blocks such as with stand alone, non-stored PL/ SQL procedures. It must come first in a PL/SQL stand alone file if it is used. Read More
In what order should a open/fetch/loop set of commands in a PL/SQL block be implemented if you use the NOTFOUND cursor variable in the exit when statement? Why?
Added on Thu, Dec 31, 2009
OPEN then FETCH then LOOP followed by the exit when. If not specified in this order will result in the final return being done twice because of the way the %NOTFOUND is handled by PL/SQL. Read More
What are SQLCODE and SQLERRM and why are they important for PL/SQL developers?
Added on Thu, Dec 31, 2009
SQLCODE returns the value of the error number for the last error encountered. The SQLERRM returns the actual error message for the last error encountered. They can be used in exception handling to report, or, store in an... Read More
How can you find within a PL/SQL block, if a cursor is open?
Added on Thu, Dec 31, 2009
Use the %ISOPEN cursor status variable. Read More
How can you generate debugging output from PL/SQL?
Added on Thu, Dec 31, 2009
Use the DBMS_OUTPUT package. Another possible method is to just use the SHOW ERROR command, but this only shows errors. The DBMS_OUTPUT package can be used to show intermediate results from loops and the status of variables... Read More
What are the types of triggers?
Added on Thu, Dec 31, 2009
There are 12 types of triggers in PL/SQL that consist of combinations of the BEFORE, AFTER, ROW, TABLE, INSERT, UPDATE, DELETE and Page 11 ALL key words: BEFORE ALL ROW INSERT AFTER ALL ROW INSERT BEFORE... Read More
How can variables be passed to a SQL routine?
Added on Thu, Dec 31, 2009
By use of the & symbol. For passing in variables the numbers 1-8 can be used (&1, &2,...,&8) to pass the values after the command into the SQLPLUS session. To be prompted for a specific variable, place the... Read More
You want to include a carriage return/linefeed in your output from a SQL script, how can you do this?
Added on Thu, Dec 31, 2009
The best method is to use the CHR() function (CHR(10) is a return/linefeed) and the concatenation function "||". Another method, although it is hard to document and isn?t always portable is to use the return/linefeed as a... Read More
How can you call a PL/SQL procedure from SQL?
Added on Thu, Dec 31, 2009
By use of the EXECUTE (short form EXEC) command. Read More
How do you execute a host operating system command from within SQL?
Added on Thu, Dec 31, 2009
By use of the exclamation point "!" (in UNIX and some other OS) or the HOST (HO) command. Read More
You want to use SQL to build SQL, what is this called and give an example
Added on Thu, Dec 31, 2009
This is called dynamic SQL. An example would be: set lines 90 pages 0 termout off feedback off verify off spool drop_all.sql select ?drop user ?||username||? cascade;? from dba_users where username not in ("SYS?,... Read More
What SQLPlus command is used to format output from a select?
Added on Thu, Dec 31, 2009
This is best done with the COLUMN command. Read More
You want to group the following set of select returns, what can you group on? Max(sum_of_cost), min(sum_of_cost), count(item_no), item_no
Added on Thu, Dec 31, 2009
The only column that can be grouped on is the "item_no" column, the rest have aggregate functions associated with them. Read More
What special Oracle feature allows you to specify how the cost based system treats a SQL statement?
Added on Thu, Dec 31, 2009
Level: Intermediate to high Expected answer: The COST based system allows the use of HINTs to control the optimizer path selection. If they can give some example hints such as FIRST ROWS, ALL ROWS, USING INDEX, STAR, even... Read More
What is a Cartesian product?
Added on Thu, Dec 31, 2009
A Cartesian product is the result of an unrestricted join of two or more tables. The result set of a three table Cartesian product will have x * y * z number of rows where x, y, z correspond to the number of rows in each... Read More
You are joining a local and a remote table, the network manager complains about the traffic involved, how can you reduce the network traffic?
Added on Thu, Dec 31, 2009
Level: High Expected answer: Push the processing of the remote data to the remote instance by using a view to pre-select the information for the join. This will result in only the data required for the join being sent across... Read More
What is the default ordering of an ORDER BY clause in a SELECT statement?
Added on Thu, Dec 31, 2009
Ascending Read More
What is tkprof and how is it used?
Added on Thu, Dec 31, 2009
Level: Intermediate to high Expected answer: The tkprof tool is a tuning tool used to determine cpu and execution times for SQL statements. You use it by first setting timed_statistics to true in the initialization file and... Read More
What is explain plan and how is it used?
Added on Thu, Dec 31, 2009
Level: Intermediate to high Expected answer: The EXPLAIN PLAN command is a tool to tune SQL statements. To use it you must have an explain_table generated in the user you are running the explain plan for. This is created... Read More
How do you set the number of lines on a page of output? The width?
Added on Thu, Dec 31, 2009
Level: Low Expected answer: The SET command in SQLPLUS is used to control the number of lines generated per page and the width of those lines, for example SET PAGESIZE 60 LINESIZE 80 will generate reports that are 60 lines... Read More
How do you prevent output from coming to the screen?
Added on Thu, Dec 31, 2009
Level: Low Expected answer: The SET option TERMOUT controls output to the screen. Setting TERMOUT OFF turns off screen output. This option can be shortened to TERM. Read More
How do you prevent Oracle from giving you informational messages during and after a SQL statement execution?
Added on Thu, Dec 31, 2009
Level: Low Expected answer: The SET options FEEDBACK and VERIFY can be set to OFF. Read More
How do you generate file output from SQL?
Added on Thu, Dec 31, 2009
By use of the SPOOL command Read More
How can I delete all rows before a particular date?
Added on Thu, Dec 31, 2009
With a WHERE condition in the DELETE statement. Every basic SQL tutorial covers this. Read More
I want only rows which have the same IDs in both tables
Added on Thu, Dec 31, 2009
Use an INNER JOIN. Actually not a bad question, if you've never seen or heard of joins, which many new programmers apparently have not. Read More
What is the difference between Distinct and Unique?
Added on Thu, Dec 31, 2009
Also quite a reasonable question. They aren't synonyms in SQL, because each can be used only in very specific places in SQL statements—DISTINCT in a SELECT clause or COUNT(DISTINCT) expression, and UNIQUE... Read More
What is the difference between "inner" and "outer" joins?
Added on Thu, Dec 31, 2009
Outer joins return unmatched rows. Read More
What is the difference between GROUP BY and ORDER BY clauses?
Added on Thu, Dec 31, 2009
One does grouping, the other does ordering. That might sound flippant, but it is not meant to be. We really do like the short questions, because it gives us so much latitude in choosing the examples with which to... Read More
SOME ADDITIONAL QUESTIONS ONLY, RELATED TO SQL
Added on Thu, Dec 31, 2009
Write a query to get the second highest amount in the table List last name and hire date of any employee in the same department as Zlotkey I always get puzzled up when asked some typical questions in interview like the... Read More
What is SELECT statement?
Added on Thu, Dec 31, 2009
The SELECT statement lets you select a set of values from a table in a database. The values selected from the database table would depend on the various conditions that are specified in the SQL query. Read More
How can you compare a part of the name rather than the entire name?
Added on Thu, Dec 31, 2009
SELECT * FROM people WHERE empname LIKE '%ab%' Would return a recordset with records consisting empname the sequence 'ab' in empname . Read More
What is the INSERT statement?
Added on Thu, Dec 31, 2009
The INSERT statement lets you insert information into a database. Read More
How do you delete a record from a database?
Added on Thu, Dec 31, 2009
Use the DELETE statement to remove records or any particular column values from a database. Read More
How could I get distinct entries from a table?
Added on Thu, Dec 31, 2009
You can sort the results and return the sorted results to your program by using ORDER BY keyword thus saving you the pain of carrying out the sorting yourself. The ORDER BY keyword is used for sorting. SELECT empname, age, city... Read More
How can I find the total number of records in a table?
Added on Thu, Dec 31, 2009
You could use the COUNT keyword , example SELECT COUNT(*) FROM emp WHERE age>40 Read More
What is GROUP BY?
Added on Thu, Dec 31, 2009
The GROUP BY keywords have been added to SQL because aggregate functions (like SUM) return the aggregate of all column values every time they are called. Without the GROUP BY functionality, finding the sum for each individual group of... Read More
What are the Large object types suported by Oracle?
Added on Thu, Dec 31, 2009
Blob and Clob. Read More
What's the difference between a primary key and a unique key?
Added on Thu, Dec 31, 2009
Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major... Read More
What are triggers? How to invoke a trigger on demand?
Added on Thu, Dec 31, 2009
Triggers are special kind of stored procedures that get executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table. Triggers can't be invoked on demand. They get triggered only when an... Read More
What is a join and explain different types of joins.
Added on Thu, Dec 31, 2009
Joins are used in queries to explain how different tables are related. Joins also let you select data from a table depending upon data from another table. Types of joins: INNER JOINs, OUTER JOINs, CROSS JOINs. OUTER JOINs are... Read More
What is a self join?
Added on Thu, Dec 31, 2009
Self join is just like any other join, except that two instances of the same table will be joined in the query. Read More
How would you find out the total number of rows in a table?
Added on Thu, Dec 31, 2009
Use SELECT COUNT(*) ... in query Read More
How do you eliminate duplicate values in SELECT ?
Added on Thu, Dec 31, 2009
Use SELECT DISTINCT ... in SQL query Read More
How you insert records into a table
Added on Thu, Dec 31, 2009
Using SQL INSERT statement Read More
How do you delete record from a table ?
Added on Thu, Dec 31, 2009
Using DELETE statement Example : DELETE FROM EMP Read More
How do you select a row using indexes?
Added on Thu, Dec 31, 2009
Specify the indexed columns in the WHERE clause of query. Read More
How do you find the maximum value in a column?
Added on Thu, Dec 31, 2009
Use SELECT MAX(...) .. in query Read More
How do you retrieve the first 5 characters of FIRSTNAME column of table EMP ?
Added on Thu, Dec 31, 2009
SELECT SUBSTR(FIRSTNAME,1,5) FROM EMP Read More
What is UNION,UNION ALL in SQL?
Added on Thu, Dec 31, 2009
UNION : eliminates duplicates UNION ALL: retains duplicates Both these are used to combine the results of different SELECT statements. Read More
Suppose I have five SQL SELECT statements connected by UNION/UNION ALL, how many times should I specify UNION to eliminate the duplicate rows?
Added on Thu, Dec 31, 2009
Once. Read More
In the WHERE clause what is BETWEEN and IN?
Added on Thu, Dec 31, 2009
BETWEEN supplies a range of values while IN supplies a list of values. Read More
Is BETWEEN inclusive of the range values specified?
Added on Thu, Dec 31, 2009
Yes. Read More
What is 'LIKE' used for in WHERE clause? What are the wildcard characters?
Added on Thu, Dec 31, 2009
LIKE is used for partial string matches. ‘%’ ( for a string of any character ) and ‘_’ (for any single character ) are the two wild card characters. Read More
When do you use a LIKE statement?
Added on Thu, Dec 31, 2009
To do partial search e.g. to search employee by name, you need not specify the complete name; using LIKE, you can search for partial string matches.      Example SQL :  SELECT EMPNO FROM EMP   ... Read More
What do you accomplish by GROUP BY ... HAVING clause?
Added on Thu, Dec 31, 2009
GROUP BY partitions the selected rows on the distinct values of the column on which you group by. HAVING selects GROUPs which match the criteria specified Read More
Consider the employee table with column PROJECT nullable. How can you get a list of employees who are not assigned to any project?
Added on Thu, Dec 31, 2009
SQL  :  SELECT EMPNO         FROM EMP         WHERE PROJECT IS null; Read More
What are the large objects supported by oracle and db2?
Added on Thu, Dec 31, 2009
Blob , Clob ( Binary Large Objects, Character Large Objects) Read More
What is a join and explain different types of joins?
Added on Thu, Dec 31, 2009
INNER JOIN OUTER JOIN LEFT OUTER JOIN RIGHT OUTER JOIN FULL OUTER JOIN Read More
What is a transaction and ACID?
Added on Thu, Dec 31, 2009
Transaction - A transaction is a logicl unint of work. All steps must be commited or rolled back. ACID - Atomicity, Consistency, Isolation and Duralbility, these are properties of a transaction. Read More
Materialized Query Tables in db2 ( This feature might not be available in oracle) ?
Added on Thu, Dec 31, 2009
Materialized Query Tables or MQTs are also known as automatic summary tables. A materialized query table (MQT) is a table whose definition is based upon the result of a query. The... Read More
How do you implement one-to-one, one-to-many and many-to-many relationships while designing tables?
Added on Thu, Dec 31, 2009
One-to-One relationship can be implemented as a single table and rarely as two tables with primary and foreign key relationships. One-to-Many relationships are implemented by splitting the data into two tables with primary ... Read More
What are user defined datatypes and when you should go for them?
Added on Thu, Dec 31, 2009
User defined datatypes let you extend the base SQL Server datatypes by providing a descriptive name, and format to the database. Take for example, in your database, there is a column called Flight_Num which appears in many... Read More
What are defaults? Is there a column to which a default can't be bound?
Added on Thu, Dec 31, 2009
A default is a value that will be used by a column, if no value is supplied to that column while inserting data. IDENTITY columns and timestamp columns can't have defaults bound to them. Read More
What is a transaction and what are ACID properties?
Added on Thu, Dec 31, 2009
A transaction is a logical unit of work in which, all the steps must be performed or none. ACID stands for Atomicity, Consistency, Isolation, Durability. These are the properties of a transaction. Read More
Explain different isolation levels
Added on Thu, Dec 31, 2009
An isolation level determines the degree of isolation of data between concurrent transactions. The default SQL Server isolation level is Read Committed. Here are the other isolation levels (in the ascending order of ... Read More
What type of Index will get created after executing the above statement?
Added on Thu, Dec 31, 2009
Non-clustered index. Important thing to note: By default a clustered index gets created on the primary key, unless specified otherwise. Read More
Explain Active/Active and Active/Passive cluster configurations
Added on Thu, Dec 31, 2009
Hopefully you have experience setting up cluster servers. But if you don't, at least be familiar with the way clustering works and the two clusterning configurations Active/Active and Active/Passive. Read More
What is lock escalation?
Added on Thu, Dec 31, 2009
Lock escalation is the process of converting a lot of low level locks (like row locks, page locks) into higher level locks (like table locks). Every lock is a memory structure too many locks would mean, more memory being ... Read More
What's the difference between DELETE TABLE and TRUNCATE TABLE commands?
Added on Thu, Dec 31, 2009
DELETE TABLE is a logged operation, so the deletion of each row gets logged in the transaction log, which makes it slow. TRUNCATE TABLE also deletes all the rows in a table, but it won't log the deletion of each row, ... Read More
What are constraints? Explain different types of constraints.
Added on Thu, Dec 31, 2009
Constraints enable the RDBMS enforce the integrity of the database automatically, without needing you to create triggers, rule or defaults. Types of constraints: NOT NULL, CHECK, UNIQUE, PRIMARY KEY, FOREIGN KEY For an... Read More
What is an index? What are the types of indexes? How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?
Added on Thu, Dec 31, 2009
I create a separate index on each column of a table. what are the advantages and disadvantages of this approach? Indexes in SQL Server are similar to the indexes in books. They help SQL Server retrieve the data quicker. ... Read More
What is RAID and what are different types of RAID configurations?
Added on Thu, Dec 31, 2009
RAID stands for Redundant Array of Inexpensive Disks, used to provide fault tolerance to database servers. There are six RAID levels 0 through 5 offering different levels of performance, fault tolerance. Read More
What are the steps you will take to improve performance of a poor performing query?
Added on Thu, Dec 31, 2009
This is a very open ended question and there could be a lot of reasons behind the poor performance of a query. But some general issues that you could talk about would be: No indexes, table scans, missing or out of date ... Read More
What are the steps you will take, if you are tasked with securing an SQL Server?
Added on Thu, Dec 31, 2009
Preferring NT authentication, using server, databse and application roles to control access to the data, securing the physical database files using NTFS permissions, using an unguessable SA password, restricting physical... Read More
What is a deadlock and what is a live lock? How will you go about resolving deadlocks?
Added on Thu, Dec 31, 2009
Deadlock is a situation when two processes, each having a lock on one piece of data, attempt to acquire a lock on the other's piece. Each process would wait indefinitely for the other to release the lock, unless one of the ... Read More
Explain CREATE DATABASE syntax
Added on Thu, Dec 31, 2009
Many of us are used to craeting databases from the Enterprise Manager or by just issuing the command: CREATE DATABAE MyDB. But what if you have to create a database with two filegroups, one on drive C and the other on drive... Read More
As a part of your job, what are the DBCC commands that you commonly use for database maintenance?
Added on Thu, Dec 31, 2009
DBCC CHECKDB, DBCC CHECKTABLE, DBCC CHECKCATALOG, DBCC CHECKALLOC, DBCC SHOWCONTIG, DBCC SHRINKDATABASE, DBCC SHRINKFILE etc. But there are a whole load of DBCC commands which are very useful for DBAs. Read More
What are statistics, under what circumstances they go out of date, how do you update them?
Added on Thu, Dec 31, 2009
Statistics determine the selectivity of the indexes. If an indexed column has unique values then the selectivity of that index is more, as opposed to an index with non-unique values. Query optimizer uses these indexes in ... Read More
What are the different ways of moving data/databases between servers and databases in SQL Server?
Added on Thu, Dec 31, 2009
There are lots of options available, you have to choose your option depending upon your requirements. Some of the options you have are: BACKUP/RESTORE, dettaching and attaching databases, replication, DTS, BCP, logshipping,... Read More
Explian different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan?
Added on Thu, Dec 31, 2009
Types of backups you can create in SQL Sever 7.0+ are Full database backup, differential database backup, transaction log backup, filegroup backup. Check out the BACKUP and RESTORE commands in SQL Server books online. Be... Read More
What is database replication? What are the different types of replication you can set up in SQL Server?
Added on Thu, Dec 31, 2009
Replication is the process of copying/moving data between databases on the same or different servers. SQL Server supports the following types of replication scenarios: * Snapshot replication * Transactional replication ... Read More
Can you have a nested transaction?
Added on Thu, Dec 31, 2009
Yes, very much. Check out BEGIN TRAN, COMMIT, ROLLBACK, SAVE TRAN and @@TRANCOUNT Read More
What is an extended stored procedure? Can you instantiate a COM object by using T-SQL?
Added on Thu, Dec 31, 2009
An extended stored procedure is a function within a DLL (written in a programming language like C, C++ using Open Data Services (ODS) API) that can be called from T-SQL, just the way we call normal stored procedures using... Read More
What is the system function to get the current user's user id?
Added on Thu, Dec 31, 2009
USER_ID(). Also check out other system functions like USER_NAME(), SYSTEM_USER, SESSION_USER, CURRENT_USER, USER, SUSER_SID(), HOST_NAME(). Read More
What is RDBMS?
Added on Thu, Dec 31, 2009
Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be created and maintained across and among the data and tables. In a... Read More
What is normalization?
Added on Thu, Dec 31, 2009
Database normalization is a data design and organization process applied to data structures based on rules that help build relational databases. In relational database design, the process of organizing data to minimize... Read More
What is Stored Procedure?
Added on Thu, Dec 31, 2009
A stored procedure is a named group of SQL statements that have been previously created and stored in the server database. Stored procedures accept input parameters so that a single procedure can be used over the network by... Read More
What is Trigger?
Added on Thu, Dec 31, 2009
A trigger is a SQL procedure that initiates an action when an event (INSERT, DELETE or UPDATE) occurs. Triggers are stored in and managed by the DBMS.Triggers are used to maintain the referential ©http://www... Read More
What is View?
Added on Thu, Dec 31, 2009
A simple view can be thought of as a subset of a table. It can be used for retrieving data, as well as updating or deleting rows. Rows updated or deleted in the view are updated or deleted in the table the view was created... Read More
What is Index?
Added on Thu, Dec 31, 2009
An index is a physical structure containing pointers to the data. Indices are created in an existing table to locate rows more quickly and efficiently. It is possible to create an index on one or more columns of a table, and... Read More
What is the difference between clustered and a non-clustered index?
Added on Thu, Dec 31, 2009
A clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table can have only one clustered index. The leaf nodes of a clustered index contain the data pages. ... Read More
What are the different index configurations a table can have?
Added on Thu, Dec 31, 2009
A table can have one of the following index configurations: No indexes A clustered index A clustered index and many nonclustered indexes A nonclustered index Many nonclustered indexes Read More
What is cursors?
Added on Thu, Dec 31, 2009
Cursor is a database object used by applications to manipulate data in a set on a row-by-row basis, instead of the typical SQL commands that operate on all the rows in the set at one time. ©http://www.sqlauthority.com ... Read More
What is the use of DBCC commands?
Added on Thu, Dec 31, 2009
DBCC stands for database consistency checker. We use these commands to check the consistency of the databases, i.e., maintenance, validation task and status checks. E.g. DBCC CHECKDB - Ensures that tables in the db and the... Read More
What is Collation?
Added on Thu, Dec 31, 2009
Collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence, with options for specifying casesensitivity, accent marks,... Read More
What are different type of Collation Sensitivity?
Added on Thu, Dec 31, 2009
Case sensitivity A and a, B and b, etc. Accent sensitivity a and á, o and ó, etc. Kana Sensitivity When Japanese kana characters Hiragana and Katakana are treated differently, it is called Kana ... Read More
How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?
Added on Thu, Dec 31, 2009
One-to-One relationship can be implemented as a single table and rarely as two tables with primary and foreign key relationships. One-to-Many relationships are implemented by splitting the data into two tables with primary... Read More
What is difference between DELETE & TRUNCATE commands?
Added on Thu, Dec 31, 2009
Delete command removes the rows from a table based on the condition that we provide with a WHERE clause. Truncate will actually remove all the rows from a table and there will be no data in the table after we run the... Read More
When is the use of UPDATE_STATISTICS command?
Added on Thu, Dec 31, 2009
This command is basically used when a large processing of data has occurred. If a large amount of deletions any modification or Bulk Copy into the tables has occurred, it has to update the indexes to take these changes into... Read More
What types of Joins are possible with Sql Server?
Added on Thu, Dec 31, 2009
Joins are used in queries to explain how different tables are related. Joins also let you select data from a table depending upon data from another table. Types of joins: INNER JOINs, OUTER JOINs, CROSS JOINs. OUTER JOINs... Read More
What is sub-query? Explain properties of sub-query.
Added on Thu, Dec 31, 2009
Sub-queries are often referred to as sub-selects, as they allow a SELECT statement to be executed arbitrarily within the body of another SQL statement. A sub-query is executed by enclosing it in a set of parentheses. Sub... Read More
What is SQL Profiler?
Added on Thu, Dec 31, 2009
SQL Profiler is a graphical tool that allows system administrators to monitor events in an instance of Microsoft SQL Server. You can capture and save data about each event to a file or SQL Server table to analyze later. For... Read More
What kind of User-Defined Functions can be created?
Added on Thu, Dec 31, 2009
There are three types of User-Defined functions in SQL Server 2000 and they are Scalar, Inline Table- Valued and Multi-statement Table-valued. Scalar User-Defined Function A Scalar user-defined function returns one of... Read More
Which TCP/IP port does SQL Server run on? How can it be changed?
Added on Thu, Dec 31, 2009
SQL Server runs on port 1433. It can be changed from the Network Utility TCP/IP properties –> Port number.both on client and the server. Read More
What are the authentication modes in SQL Server? How can it be changed?
Added on Thu, Dec 31, 2009
Windows mode and mixed mode (SQL & Windows). To change authentication mode in SQL Server click Start, Programs, Microsoft SQL Server and click SQL Enterprise Manager to run SQL Enterprise Manager from the Microsoft SQL... Read More
Which command using Query Analyzer will give you the version of SQL server and operating system?
Added on Thu, Dec 31, 2009
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition') Read More
What is SQL server agent?
Added on Thu, Dec 31, 2009
SQL Server agent plays an important role in the day-to-day tasks of a database administrator (DBA). It is often overlooked as one of the main tools for SQL Server management. Its purpose is to ease the implementation of... Read More
Can a stored procedure call itself or recursive stored procedure? How many level SP nesting possible?
Added on Thu, Dec 31, 2009
Yes. Because Transact-SQL supports recursion, you can write stored procedures that call themselves. Recursion can be defined as a method of problem solving wherein the solution is arrived at by repetitively applying it to... Read More
What is @@ERROR?
Added on Thu, Dec 31, 2009
The @@ERROR automatic variable returns the error code of the last Transact-SQL statement. If there was no error, @@ERROR returns zero. Because @@ERROR is reset after each Transact-SQL statement, it must be saved to a... Read More
What is Raiseerror?
Added on Thu, Dec 31, 2009
Stored procedures report errors to client applications via the RAISERROR command. RAISERROR doesn't change the flow of a procedure; it merely displays an error message, sets the @@ERROR automatic variable, and... Read More
What is log shipping?
Added on Thu, Dec 31, 2009
Log shipping is the process of automating the backup of database and transaction log files on a production SQL server, and then restoring them onto a standby server. Enterprise Editions only supports log shipping.... Read More
What is the difference between a local and a global variable?
Added on Thu, Dec 31, 2009
A local temporary table exists only for the duration of a connection or, if defined inside a compound statement, for the duration of the compound statement. A global temporary table remains in the database permanently, but... Read More
What command do we use to rename a db?
Added on Thu, Dec 31, 2009
sp_renamedb ‘oldname’ , ‘newname’ If someone is using db it will not accept sp_renmaedb. In that case first bring db to single user using sp_dboptions. Use sp_renamedb to rename database. Use... Read More
What is sp_configure commands and set commands?
Added on Thu, Dec 31, 2009
Use sp_configure to display or change server-level settings. To change database-level settings, use ALTER DATABASE. To change settings that affect only the current user session, use the SET statement. Read More
What are the different types of replication? Explain.
Added on Thu, Dec 31, 2009
The SQL Server 2000-supported replication types are as follows: · Transactional · Snapshot · Merge Snapshot replication distributes data exactly as it appears at a specific moment in time and does not ... Read More
What are three SQL keywords used to change or set someone’s permissions?
Added on Thu, Dec 31, 2009
GRANT, DENY, and REVOKE. Read More
What does it mean to have quoted_identifier on? What are the implications of having it off?
Added on Thu, Dec 31, 2009
When SET QUOTED_IDENTIFIER is ON, identifiers can be delimited by double quotation marks, and literals must be delimited by single quotation marks. When SET QUOTED_IDENTIFIER is OFF, identifiers cannot be quoted and must... Read More
How to rebuild Master Database?
Added on Thu, Dec 31, 2009
Shutdown Microsoft SQL Server 2000, and then run Rebuildm.exe. This is located in the Program FilesMicrosoft SQL Server80ToolsBinn directory. In the Rebuild Master dialog box, click Browse. In the Browse for Folder... Read More
What are primary keys and foreign keys?
Added on Thu, Dec 31, 2009
Primary keys are the unique identifiers for each row. They must contain unique values and cannot be null. Due to their importance in relational databases, Primary keys are the most fundamental of all keys and constraints. A... Read More
What is data integrity? Explain constraints?
Added on Thu, Dec 31, 2009
Data integrity is an important feature in SQL Server. When used properly, it ensures that data is ©http://www.sqlauthority.com ©http://www.sqlauthority.com accurate, correct, and valid. It also acts as a trap... Read More
What are the properties of the Relational tables?
Added on Thu, Dec 31, 2009
Relational tables have six properties: · Values are atomic. · Column values are of the same kind. · Each row is unique. · The sequence of columns is insignificant. · The sequence of rows is insignificant.... Read More
What is De-normalization?
Added on Thu, Dec 31, 2009
De-normalization is the process of attempting to optimize the performance of a database by adding redundant data. It is sometimes necessary because current DBMSs implement the relational model poorly. A true relational DBMS... Read More
How to get @@error and @@rowcount at the same time?
Added on Thu, Dec 31, 2009
If @@Rowcount is checked after Error checking statement then it will have 0 as the value of @@Recordcount as it would have been reset. And if @@Recordcount is checked before the error-checking statement then @@Error would... Read More
What is a Scheduled Jobs or What is a Scheduled Tasks?
Added on Thu, Dec 31, 2009
Scheduled tasks let user automate processes that run on regular or predictable cycles. User can schedule administrative tasks, such as cube processing, to run during times of slow business activity. User can also determine... Read More
What is BCP? When does it used?
Added on Thu, Dec 31, 2009
BulkCopy is a tool used to copy huge amount of data from tables and views. BCP does not copy the structures same as source to destination. Read More
How do you load large data to the SQL server database?
Added on Thu, Dec 31, 2009
BulkCopy is a tool used to copy huge amount of data from tables. BULK INSERT command helps to Imports a data file into a database table or view in a user-specified format. Can we rewrite subqueries into simple select... Read More
Can SQL Servers linked to other servers like Oracle?
Added on Thu, Dec 31, 2009
SQL Server can be lined to any server provided it has OLE-DB provider from Microsoft to allow a link. E.g. Oracle has a OLE-DB provider for oracle that Microsoft provides to add it as linked server to SQL Server group. Read More
How to know which index a table is using?
Added on Thu, Dec 31, 2009
SELECT table_name,index_name FROM user_constraints Read More
How to copy the tables, schema and views from one SQL server to another?
Added on Thu, Dec 31, 2009
Microsoft SQL Server 2000 Data Transformation Services (DTS) is a set of graphical tools and programmable objects that lets user extract, transform, and consolidate data from disparate sources into single or multiple... Read More
What is DataWarehousing?
Added on Thu, Dec 31, 2009
· Subject-oriented, meaning that the data in the database is organized so that all the data elements relating to the same real-world event or object are linked together; · Time-variant, meaning that the changes to the data... Read More
What is an execution plan? When would you use it? How would you view the execution plan?
Added on Thu, Dec 31, 2009
An execution plan is basically a road map that graphically or textually shows the data retrieval methods chosen by the SQL Server query optimizer for a stored procedure or ad-hoc query and is a very useful tool for a... Read More
What is the difference between TRUNCATE and DELETE commands?
Added on Wed, Jan 13, 2010
TRUNCATE is a DDL command whereas DELETE is a DML command. Hence DELETE operation can be rolled back, but TRUNCATE operation cannot be rolled back.<br>WHERE clause can be used with DELETE and not with TRUNCATE. Read More
Which system tables contain information on privileges granted and privileges obtained
Added on Wed, Jan 13, 2010
USER_TAB_PRIVS_MADE, USER_TAB_PRIVS_RECD. Read More
What is the use of the DROP option in the ALTER TABLE command
Added on Wed, Jan 13, 2010
It is used to drop constraints specified on the table. Read More
How to programmatically find out when the SQL Server service started?
Added on Wed, Jan 13, 2010
Answer:-There is one simple but awkward method is there to find out when the SQL server service is started. The following query will give you the time when the SQL server service is started; select crdate from [master].dbo.sysdatabases ... Read More
TRUNCATE TABLE EMP; DELETE FROM EMP; Will the outputs of the above two commands differ?
Added on Wed, Jan 13, 2010
A delete statement deletes all records in the table, but it does not free any space. A Truncate statement frees the space as well. However, a truncate can not be rolled back but delete can be rolled back. Read More
Which system table contains information on constraints on all the tables created?
Added on Wed, Jan 13, 2010
USER_CONSTRAINTS. Read More
State true or false.
Added on Wed, Jan 13, 2010
Question : State true or false. !=, <>, ^= all denote the same operation.       Answers: True. ^= Not same as <> or !=     Read More
What is outer join?Explain with examples.
Added on Wed, Jan 13, 2010
The Left Outer Join returns all the rows from the Left Table with the values that match with the Key from the second table. The Right Outer Join returns all the rows from the Right Table with the values that match with the key from the first... Read More
Write a SQL statement to draw the second highest salary in Employee Table (Using Sub query)
Added on Wed, Jan 13, 2010
Question : Write a SQL statement to draw the second highest salary in Employee Table (Using Sub query) Table structure is: Employe ID Name Salary             Answers:   For MS SQL... Read More
How to find out the database name from SQL*PLUS command prompt?
Added on Wed, Jan 13, 2010
Select * from global_name; This will give the datbase name which u r currently connected to..... Read More
How to create a new table? How to insert another column into the table?
Added on Wed, Jan 13, 2010
Inserting a new Column into a table: General Syntax: insert into tablename(columnname datatype); Example: insert into employee(salary number(10)); Read More
How to retrieving the data from 11th column to n th column in a table.
Added on Wed, Jan 13, 2010
select * from emp where rowid in ( select rowid from emp where rownum <=&upto minus select rowid from emp where rownum <&startfrom) from this you can select between any range. Read More
lets i have a table "bapi" having 6 field like this
Added on Wed, Jan 13, 2010
Question : lets i have a table "bapi" having 6 field like this f1 f2 f3 f4 f5 f6 ... ... .. ... ... ... p r o m o d i want to retrive all the data by using select statement and my output will be look like this: xyz ... p r ... Read More
When using a count(disitnct) is it better to use a self-join or temp table to find redundant data, and provide an example?
Added on Wed, Jan 13, 2010
Instead of this we can use GROUP BY Clause with HAVING condition. For ex, Select count(*),lastname from tblUsers group by lastname having count(*)>1 This query return the duplicated lastnames values in the lastname column from tblUsers... Read More
What is a clustered index?
Added on Wed, Jan 13, 2010
There are clustered and nonclustered indexes. A clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table can have only one clustered index. The leaf nodes of a clustered index... Read More
I have a table with duplicate names in it. Write me a query which returns only duplicate rows with number of times they are repeated
Added on Wed, Jan 13, 2010
SELECT COL1 FROM TAB1 WHERE COL1 IN (SELECT MAX(COL1) FROM TAB1 GROUP BY COL1 HAVING COUNT(COL1) > 1 ) Read More
on index
Added on Wed, Jan 13, 2010
Question : on index why u need indexing ? where that is stroed and what u mean by schema object? for what purpose we are using view Answers: We cant create an Index on Index.. Index is stoed in user_index table.Every... Read More
What is normalization and different kinds of normalization
Added on Wed, Jan 13, 2010
It is set of rules that have been established to aid in the design of tables that are meant to be connected through relationships. This set of rules is known as Normalization. Benefits of normalizing your database will include: √ Avoiding... Read More
What columns would you use as a clustered index on a retail store address table?
Added on Wed, Jan 13, 2010
On Primary Key column. Read More
what is the difference between oracle,sql and sql server
Added on Wed, Jan 13, 2010
Oracle is based on RDBMS. SQL is Structured Query Language. SQL Server is another tool for RDBMS provided by MicroSoft. Read More
State true or false. EXISTS, SOME, ANY are operators in SQL.
Added on Wed, Jan 13, 2010
True. Read More
How to testdata loading in database testing?
Added on Wed, Jan 13, 2010
No answer available currently. Be the first one to reply to this question by submitting your answer from the form below.   Read More
When we give SELECT * FROM EMP; How does oracle respond:
Added on Wed, Jan 13, 2010
When u give SELECT * FROM EMP; the server check all the data in the EMP file and it displays the data of the EMP file Read More
What is the difference between TRUNCATE and DELETE commands
Added on Wed, Jan 13, 2010
Both will result in deleting all the rows in the table .TRUNCATE call cannot be rolled back as it is a DDL command and all memory space for that table is released back to the server. TRUNCATE is much faster.Whereas DELETE call is an DML command and... Read More
What is Materialized View?
Added on Wed, Jan 13, 2010
A materialized view is a database object that contains the results of a query. They are local copies of data located remotely or used to create summary tables based on aggregation of a tables data. Materialized views which store data based on the... Read More
What the difference between UNION and UNIONALL?
Added on Wed, Jan 13, 2010
Union- this gives distinct rows and also sort the data in ascending order. Union All- this gives all the rows and does not sort the rows. Read More
What?s the difference between a primary key and a unique key?
Added on Wed, Jan 13, 2010
Both primary key and unique key are used to identify a record(row)of a table. Unique key accepts null value but primary key doesn't accept null values. primary key creates clustered index and unique key creates non clustered index. Read More
How to get the first day of the week, last day of the week and last day of the month using T-SQL date functions?
Added on Wed, Jan 13, 2010
Use the command datapart(dw,filed) and if it returns 1 then it is first day of the week(Monday) Read More
What is normalization,types with eg's. _ with queries of all types?
Added on Wed, Jan 13, 2010
There are 5 normal forms. It is necessary for any database to be in the third normal form to maintain referential integrity and non-redundance.<br><br>First Normal Form: Every field of a table (row,col) must contain an atomic value<br... Read More
What is output of following query Select 2 from employee;
Added on Wed, Jan 13, 2010
It depends upon number of rows in table. This query will print 2 as many times as rows in table. Read More
Which command displays the SQL command in the SQL buffer, and then executes it
Added on Wed, Jan 13, 2010
Uset the LIST or L command to get the recent one from SQL Buffer Read More
How write a SQL statement to query the result set and display row as columns and columns as row?
Added on Wed, Jan 13, 2010
TRANSFORM Count(Roll_no) AS CountOfRoll_no SELECT Academic_Status FROM tbl_enr_status GROUP BY Academic_Status PIVOT Curnt_status; Read More
How to store directory structure in a database?
Added on Wed, Jan 13, 2010
We can do it by the following command:create or replace directory as 'c: mp' Read More
Is there any query which is used to find the case sensitivity in each records in database through visual basic?
Added on Wed, Jan 13, 2010
For case sensitive string comparison in SQL one has to use substring() and ascii() functions in the following way. Get first character of both strings using substring function as substring(str1, 1, 1) Find ascii value of both characters and... Read More
Explain the concept of joins and list out the different type of joins?
Added on Wed, Jan 13, 2010
Joins are used to combine tables. There are 3 type of joins. self joines, outer joines and inner joins Read More
How you define which session run and how long time ?
Added on Wed, Jan 13, 2010
If you have the better answer, then send it to us. We will display your answer after the approval. Read More
How to find out the 10th highest salary in SQL query?
Added on Wed, Jan 13, 2010
Table - Tbl_Test_Salary Column - int_salary select max(int_salary) from Tbl_Test_Salary where int_salary in (select top 10 int_Salary from Tbl_Test_Salary order by int_salary) Read More
What is database?
Added on Wed, Jan 13, 2010
A database is a collection of data that is organized so that its contents can easily be accessed, managed and updated. another definition is: A collection of information organized in such a way that a computer program can quickly select desired... Read More
What is table space
Added on Wed, Jan 13, 2010
Table-space is a physical concept.it has pages where the records of the database is stored with a logical perception of tables.so tablespace contains tables. Read More
Whats the back end processes when we type "Select * from Table"?
Added on Wed, Jan 13, 2010
First it will look into the System Global Area (SGA) weather the query is been exectued earlier. If it exist, it would retrive the same output present in memory. If not the query we typed is complied and the resulting parse tree and excution plan... Read More
How can we backup the sql files & what is SAP?
Added on Wed, Jan 13, 2010
u can backup the sql files through backup utilities or some backup command in sql . SAP is ERP software for the organization to integrate the software . Read More
What is integrity in sql?
Added on Wed, Jan 13, 2010
Assures database data and structures reflects all changes made to them in the correct sequence. Locks ensure data integrity and maximum concurrent access to data. Commit statement releases all locks. Types of locks are given below. Data Locks... Read More
Why do stored procedures reduce network traffic ?
Added on Wed, Jan 13, 2010
When a stored procedure is called, only the procedure call is sent to the server and not the statements that the procedure contains. Read More
What is inheritance ?
Added on Wed, Jan 13, 2010
Inheritance is a method by which properties and methods of an existing object are automatically passed to any object derived from it. Read More
How to generate OIDS ?
Added on Wed, Jan 13, 2010
No answer available currently. Be the first one to reply to this question by submitting your answer from the form below.   Read More
What is sql? what is the difference between sql and pl/sql?
Added on Wed, Jan 13, 2010
SQL: is a structured query language which subdivided in to 5 categories like<br>DDL, DML, DQL, DCL, TCL<br>PLSQL: is a programming language structured query language which consists of procedure, function, triggers, collection. Read More
Can a view be updated/inserted/deleted? If Yes, then under what conditions?
Added on Wed, Jan 13, 2010
A View can be updated/deleted/inserted if it has only one base table if the view is based on columns from one or more tables then insert, update and delete is not possible. Read More
How to analyze the performance of a query using Explain Plan? Can any one explain me this in detail... if you can provide me with a link where I can get full information on it I would appreciate it...?
Added on Wed, Jan 13, 2010
From execution plan, first you have to check whether the query uses index scan or index seek. if it is index scan then you have to make it as index seek. and then you have to see the subtree cost of the query. always it should be 0.0003 m.seconds. ... Read More
What does the following query do
Added on Wed, Jan 13, 2010
Answers: SELECT SAL + NVL(COMM,0) FROM EMP; It gives the added value of sal and comm for each employee in the emp table. NVL(null value) replaces null with 0. Read More
In subqueries, which is efficient ,the IN clause or EXISTS clause? Does they produce the same result?????
Added on Wed, Jan 13, 2010
EXISTS is efficient bcose, 1.Exists is faster than IN clause. 2.IN check returns values to main query where as EXISTS returns Boolean (T or F). Read More
How to save the output of a query/ stored procedure to a text file using T-SQL?
Added on Wed, Jan 13, 2010
Open Query Analyzer And then Press Ctrl + T After that run the query . It will ask for the path to save the file. Read More
Explain about COMMIT and ROLLBACK?
Added on Wed, Jan 13, 2010
COMMIT command is used if you are satisfied with the database and you don?t want any changes to be done to the database. Changes are permanent when you use COMMIT. ROLLBACK changes or discards all the data prior to COMMIT command. Database changes... Read More
What is the main difference between the IN and EXISTS clause in subqueries??
Added on Wed, Jan 13, 2010
The main difference between the IN and EXISTS predicate in subquery is the way in which the query gets executed. IN -- The inner query is executed first and the list of values obtained as its result is used by the outer query.The inner query is... Read More
What is cluster.cluster index and non cluster index
Added on Wed, Jan 13, 2010
Clustered Index:- A Clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table may have only one clustered index.Non-Clustered Index:- A Non-Clustered index is a special type of... Read More
Write a Query to pull out the maximum unit price for each in the database. (Using Northwind database)
Added on Wed, Jan 13, 2010
select empname,max(salary) from employee group by empname Read More
Given an unnormalized table with columns:
Added on Wed, Jan 13, 2010
The query will be :delete from tabname where rowid not in (select max(rowid) from tabname group by name )Here tabname is the table name. Read More
Given an employee and manager table, write a SQL syntax that could be used to find out an employee's manager's manager, assuming all managers are in the employee table
Added on Wed, Jan 13, 2010
it is assumed that u have created a single table for populating data of Employee and Manager (.a Manager is also an Employee so s/he will be residing in the same table) .. The sample data would be like this EmployeeID ----- EmployeeName -------... Read More
How to write a sql statement to find the first occurrence of a non zero value?
Added on Wed, Jan 13, 2010
There is a slight chance the column "a" has a value of 0 which is not null. In that case, You'll loose the information. There is another way of searching the first not null value of a column: select column_name from table_name where... Read More
What is joint?
Added on Wed, Jan 13, 2010
The SQL JOIN statement is used to combine the data contained in two relational database tables based upon a common attribute. <br><br>Basically there are two types of Joins<br><br>1. Inner Join<br><br>An inner... Read More
Why do I get "Invalid Cursor State" errors when I insert/update/delete data with executeQuery()?
Added on Wed, Jan 13, 2010
IF u get this error, then there is a problem with the Java program, U may open the cursor with the Readonly mode.Change the Resultset type then you will get it.This is not problem with the Oracle Read More
Can we call user defined packages in SQL statements?
Added on Wed, Jan 13, 2010
We can call user defined packaged functions in the SELECT statement.<br><br>e.g. SELECT pkg.test(10) FROM DUAL;<br> Read More
What operators performs pattern matching?
Added on Wed, Jan 13, 2010
Pattern matching operator is LIKE and it has to used with two attributes <br><br>1. % and <br><br>2. _ ( underscore )<br><br>% means matches zero or more characters and under score means matching exactly one... Read More
What is reference cursor ?
Added on Wed, Jan 13, 2010
Refereence cursor is dynamic cursor used with SQL statement like For select* from emp Read More
What is the difference between SQL and SQL Server?
Added on Wed, Jan 13, 2010
SQLServer is an RDBMS just like oracle,DB2 from Microsoft<br><br>whereas <br><br>Structured Query Language (SQL), pronounced "sequel", is a language that provides an interface to relational database systems. It was developed... Read More
I have a table with duplicate names in it. Write me a query which returns only duplicate rows with number of times they are repeated.
Added on Wed, Jan 13, 2010
SELECT COL1 FROM TAB1 WHERE COL1 IN (SELECT MAX(COL1) FROM TAB1 GROUP BY COL1 HAVING COUNT(COL1) > 1 ) Read More
What will be the output of the following query
Added on Wed, Jan 13, 2010
it's right TROUBLETHETROUBLE Read More
What is SQLPlus?
Added on Wed, Jan 13, 2010
SQLPlus is an application that recognizes & executes SQL commands & specialized SQL*Plus commands that can customize reports, provide help & edit facility & maintain system variables. Read More
What is NULL value function?
Added on Wed, Jan 13, 2010
Null value function converts a null value to a non-null value for the purpose of evaluating an expression. Numeric Functions accept numeric I/P & return numeric values. They are MOD, SQRT, ROUND, TRUNC & POWER. Read More
What are Date Functions?
Added on Wed, Jan 13, 2010
Date Functions are ADD_MONTHS, LAST_DAY, NEXT_DAY, MONTHS_BETWEEN & SYSDATE. Read More
What are Character Functions?
Added on Wed, Jan 13, 2010
Character Functions are INITCAP, UPPER, LOWER, SUBSTR & LENGTH. Additional functions are GREATEST & LEAST. Group Functions returns results based upon groups of rows rather than one result per row, use group functions. They are AVG, COUNT, MAX... Read More
What is compute command?
Added on Wed, Jan 13, 2010
Compute command control computations on subsets created by the BREAK command. Read More
What is spool command?
Added on Wed, Jan 13, 2010
Spool command creates a print file of the report. Read More
What are indexes?
Added on Wed, Jan 13, 2010
Indexes are optional structures associated with tables used to speed query execution and/or guarantee uniqueness. Create an index if there are frequent retrieval of fewer than 10-15% of the rows in a large table and columns are referenced... Read More
What are data types in sql?
Added on Wed, Jan 13, 2010
Max. columns in a table is 255. Max. Char size is 255, Long is 64K & Number is 38 digits. Cannot Query on a long column. Char, Varchar2 Max. size is 2000 & default is 1 byte. Number(p,s) p is precision range 1 to 38, s is scale -84 to 127.... Read More
What is the order of SQL statement execution?
Added on Wed, Jan 13, 2010
Where clause, Group By clause, Having clause, Order By clause & Select. Read More
What is Commit event used for?
Added on Wed, Jan 13, 2010
Commit is an event that attempts to make data in the database identical to the data in the form. It involves writing or posting data to the database and committing data to the database. Forms check the validity of the data in fields and records... Read More
What is deadlock?
Added on Wed, Jan 13, 2010
Deadlock is a unique situation in a multi user system that causes two or more users to wait indefinitely for a locked resource. First user needs a resource locked by the second user and the second user needs a resource locked by the first user. To... Read More
What is SQLLoader?
Added on Wed, Jan 13, 2010
SQLLoader is a product for moving data in external files into tables in an Oracle database. To load data from external files into an Oracle database, two types of input must be provided to SQLLoader : The data itself and the control file. The... Read More
The most important DDL statements in SQL are?
Added on Wed, Jan 13, 2010
CREATE TABLE - creates a new database table ALTER TABLE - alters (changes) a database table DROP TABLE - deletes a database table CREATE INDEX - creates an index (search key) DROP INDEX - deletes an index Read More
What is difference between TRUNCATE & DELETE ?
Added on Wed, Jan 13, 2010
TRUNCATE commits after deleting entire table i.e., cannot be rolled back. Database triggers do not fire on TRUNCATE DELETE allows the filtered deletion. Deleted records can be rolled back or committed. Database triggers fire on DELETE. Read More
what is analyze command how to use ?
Added on Wed, Jan 13, 2010
The ANALYZE command can also be used to generate chained row information into the DBA_TABLES view. Actual chained-row rowids can be listed in a separate table if desired. Read More
Explain about the original design and basics which gave life to SQL?
Added on Wed, Jan 13, 2010
SQL was originally designed to be a declarative and data manipulation language. Additions to the language occurred because of addition of new features from vendors such as constructs, data types, extensions and control flow statements. Important... Read More
Explain about SQL?
Added on Wed, Jan 13, 2010
It is an interactive and programming language which is used to modify, manage, and to pass queries. It is an ANSI and ISO compliant language. SQL entirely depends upon its command language for modifications, changes, updating, etc to the database.... Read More
Explain about SQL related to RDBMS?
Added on Wed, Jan 13, 2010
SQL is known as structured query language. It is especially designed to retrieve and store information of data in relational database management systems. It creates, modifies and makes the data base object user access the control system. It is... Read More
Why is the most of the processing done at the sever ?
Added on Wed, Jan 13, 2010
To reduce the network traffic and for application sharing and implementing business rules. Read More
What does preemptive in preemptive multitasking mean ?
Added on Wed, Jan 13, 2010
Preemptive refers to the fact that each task is alloted fixed time slots and at the end of that time slot the next task is started. Read More
Explain about Call level interface present in SQL?
Added on Wed, Jan 13, 2010
In depth explanation of this interface is present in ISO/IEC 9075-3:2003. This extension defines components which can be used to execute SQL statements written in other programming languages. This extension is defined in such a way that the... Read More
Explain about the object language binding?s extension?
Added on Wed, Jan 13, 2010
This extension is very useful if you are planning to use SQL in Java. This extension defines the syntax and procedure to follow for SQL embedded in Java. It also makes sure of the syntax and procedures to follow which ensures the portability of... Read More
What are the various uses of database triggers ?
Added on Wed, Jan 13, 2010
Database triggers can be used to enforce business rules, to maintain derived values and perform value-based auditing. Read More
Explain about the information and definition schemas?
Added on Wed, Jan 13, 2010
This information and definition schema helps the user by giving necessary information about the tools and functions of SQL. It describes several tools and extensions some of them are object identifier, security, features provided by DBMS,... Read More
What is a transaction ?
Added on Wed, Jan 13, 2010
A transaction is a set of operations that begin when the first DML is issued and end when a commit or rollback is issued. BEGIN COMMIT/ROLLBACK are the boundries of a transaction. Read More
State the several languages into which SQL is divided into?
Added on Wed, Jan 13, 2010
SQL is divided into several sub divisions such as ? Statements ? Queries ? Expressions ? Predicates ? Clauses ? White space ? Statement terminator Read More
Explain about predicates and statements?
Added on Wed, Jan 13, 2010
Statements have a prolonged effect on the functioning and behavior of the data, care should be taken before defining a statement to the data. It may control transactions, query, sessions, connections and program flow Predicates specified conditions... Read More
Explain the ORDER BY clause?
Added on Wed, Jan 13, 2010
Orderby clause identifies the columns which are used to sort the data and the order in which they should be sorted out. SQL query needs to specify orderby clause of they want the data to be returned in a defined manner of rows and columns. Read More
Explain the where clause?
Added on Wed, Jan 13, 2010
Where clause has a comparison predicate which restricts the number of rows as per the user generated query. This clause should be applied before the GROUP BY clause. This clause functions with the help of comparison predicate, when a comparison... Read More
Why are the integrity constraints preferred to database triggers ?
Added on Wed, Jan 13, 2010
Because it is easier to define an integrity constraint than a database trigger. Read More
Explain about data retrieval?
Added on Wed, Jan 13, 2010
Data retrieval syntax is often used in combination with data projection. This mechanism is used when there is a need for calculated result. This is used when there is a special need for calculated data and not the verbatim data, which is different... Read More
Explain about the MERGE field?
Added on Wed, Jan 13, 2010
MERGE is used when you need to combine more than one table for a user generated query. This field can be aptly said as a combination of INSERT and UPDATE elements. This field is also given a different name (upsert) in some versions of SQL Read More
Why is it better to use an integrity constraint to validate data in a table than to use a stored procedure?
Added on Wed, Jan 13, 2010
Because an integrity constraint is automatically checked while data is inserted into a table. A stored has to be specifically invoked. Read More
Explain about Data definition?
Added on Wed, Jan 13, 2010
Data definition Language is used to define new tables and elements associated with it. Some of the basic data definition language elements are CREATE, TRUNCATE, ALTER, RENAME, etc. These are used to control the non standard features of the database. Read More
State about some criticisms of SQL?
Added on Wed, Jan 13, 2010
These are some of the criticisms of SQL<br>1) Implementation features vary from vendor to vendor. There are many features such as data, time, comparison sensitivity, etc<br>2) All possible combinations can be implemented in the language... Read More
What are the advantages of client/server model
Added on Wed, Jan 13, 2010
Flexibility of the system, scalability, cost saving, centralised control and implementation of business rules, increase of developers productivity, portability, improved network and resource utilization. Read More
State some reasons for lack of portability?
Added on Wed, Jan 13, 2010
There are several reasons for the lack of portability some of them are 1) Main reason is the DATE and TIME variation between databases. 2) Database is free to have its own style of implementation. 3) Ambiguity and less defined semantics of... Read More
What are the disadvantages of the client/server model ?
Added on Wed, Jan 13, 2010
Heterogeneity of the system results in reduced reliability. May not be suitable for all applications. Managing and tuning networks becomes difficult. Read More
What are the responsibilities of a Server
Added on Wed, Jan 13, 2010
1. Manage resources optimally across multiple clients. 2. Controlling database access and security. 3. Protecting the database and recovering it from crashes. 4. Enforcing integrity rules globally. Read More
What is the difference between file server and a database server ?
Added on Wed, Jan 13, 2010
A file server just transfers all the data requested by all its client and the client processes the data while a database server runs the query and sends only the query output. Read More
What are the two components of ODBC ?
Added on Wed, Jan 13, 2010
1. An ODBC manager/administrator and 2. ODBC driver. Read More
What is the function of a ODBC manager ?
Added on Wed, Jan 13, 2010
The ODBC Manager manages all the data sources that exists in the system. Read More
What is the function of a ODBC Driver ?
Added on Wed, Jan 13, 2010
The ODBC Driver allows the developer to talk to the back end database. Read More
What description of a data source is required for ODBC ?
Added on Wed, Jan 13, 2010
The name of the DBMS, the location of the source and the database dependent information. Read More
How to transfer some amount from one person's account to another's ?
Added on Wed, Jan 13, 2010
create proc sp_UpdAccounts @crAccId varchar(5), @drAccId varchar(5), @amount decimal as update AccountDetails set amount = amount - @amount where accountId = @drAccId update AccountDetails set amount = amount + @amount where accountId = ... Read More
How do I list all of my tables? How do I list all the indexed created for a particular table(say EMP)? How do I SELECT FROM DIFFERENT USERS TABLE?
Added on Wed, Jan 13, 2010
Sys.Objects table is contains all the tables details so we can retrieve from Sys.objects Select * from sys.objects where type='u' U means Table & S means Stored Procedure Read More
How to find the second highest salary from employee table? and how to write it
Added on Wed, Jan 13, 2010
select ename, sal from (select ename, sal, rank() over(order by sal) sal_rank from emp) where sal_rank<=10; or select ename,sal from(select ename,sal,rank() over(order by sal desc)sal_rank from emp where sal_rank<=10; Read More
What is the difference between where condition and having condition?
Added on Wed, Jan 13, 2010
When we use WHERE clause with the GROUP BY ALL clause,it displays all groups including those excluded from the WHERE clause whereas the HAVING clause,if used with the GROUP BY ALL clause overrides the functionality of the ALL Clause and displays only... Read More
How to retrieve the image from the database?
Added on Wed, Jan 13, 2010
using BLOB object. we can store the images n access them. Read More





©2007, 1000projects.com, Only For Educational Purpose, Non Commercial use!