-
-
Find all tables in a database
How to find all the tables existing in a database?
-
Insert a record in two tables
How to insert a record in two tables with single insert statement ?
-
Tune SQL Query
How can you tune the query?
-
Retrieve data from two tables
How to retrieve data from two tables of different servers
-
Get fieldnames from Empty Table
How to get field names from empty table by using SELECT statement;
-
How to find the Foreign keys of all child tables when pass the Parent Table name.
I developed like below.Any experts query ....please send.selecttable_name,constraint_namefrom user_cons_columns where column_name=(select a.COLUMN_NAME from user_cons_columns a,user_constraints bwhere a.TABLE_NAME=b.TABLE_NAME and b.constraint_type in ('P')and a.TABLE_NAME='DEPT')and constraint_name like '%FK%'
-
Oracle Dual
Select round(13.19,1) from dual will return 13.2Select round(13.19,-1) from dual ....what will be the output.....IN ORACLE
-
-
Using the following Customer, Country and Orders tables: Customer Table c_id c_name c_country_id 1 John 1 Country Table country_id Name 1 US 2 UK Orders Table o_id c_id Qty o_deliver_country_id 1 1 10 1 2 1 20 2
I need the following output in SQLc_id c_name c_country_lives qty o_deliver_country 1 john US 10 US 2 john US 20 UK
-
-
-
How to write a query to retrieve only the months from certain given duration.
I will be getting this duration from the dual table. Provide query for this.Like for example, if suppose I am going to get value from the month of 01-Jan-2006 to 31-Apr-2007 then My result should be only 4 months like Jan, Feb, Mar, Apr.Btu not the whole dates. Only four rows has to be retrieved. This should be retrieved from the dual table but not from other tables.
-
-
-
-
-
-
-
-
-
-