-
-
How to apply two constraints for a single column in a table?
For example::In a table Table1, I want 2 make the column "Column1" as primary key and I want the first letter must start with 'S'
-
-
How do you find the numbert of rows in a Table ?
A bad answer is count them (SELECT COUNT(*) FROM table_name)A good answer is :-'By generating SQL to ANALYZE TABLE table_name COUNT STATISTICS by querying Oracle System Catalogues (e.g. USER_TABLES or ALL_TABLES).The best answer is to refer to the utility which Oracle released which makes it unnecessary to do ANALYZE TABLE for each Table individually.
-
How to write SQL query for milliseconds in Oracle.
For example In my table one datetime field example modified_date_time.its displaying 2006-08-18 23:28:23 (here its rounding seconds)But I want the format like 2006-08-18 23:28:22.123456 (I want the absolute value for seconds like yyyy-mm-dd HH24:mi:ss.milliseconds.
-
What is a cursor?
Oracle uses work area to execute SQL statements and store processing information PL/SQL construct called a cursor lets you name a work area and access its stored information A cursor is a mechanism used to fetch more than one row in a Pl/SQl block.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Oracle SQL Interview Questions
Ans