{"id":48137,"date":"2018-01-30T05:58:52","date_gmt":"2018-01-30T00:28:52","guid":{"rendered":"http:\/\/blog.odango.com\/?p=48137"},"modified":"2023-02-04T09:45:15","modified_gmt":"2023-02-04T04:15:15","slug":"sql-interview-questions-and-answers","status":"publish","type":"post","link":"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/","title":{"rendered":"SQL Interview Questions and Answers"},"content":{"rendered":"\n[et_pb_section bb_built=&#8221;1&#8243; next_background_color=&#8221;#000000&#8243;][et_pb_row][et_pb_column type=&#8221;4_4&#8243;][et_pb_post_title _builder_version=&#8221;3.0.106&#8243; title=&#8221;on&#8221; meta=&#8221;off&#8221; author=&#8221;on&#8221; date=&#8221;on&#8221; categories=&#8221;on&#8221; comments=&#8221;on&#8221; featured_image=&#8221;off&#8221; featured_placement=&#8221;below&#8221; text_color=&#8221;dark&#8221; text_background=&#8221;off&#8221; title_font=&#8221;Titillium Web||||||||&#8221; title_font_size=&#8221;47&#8243; title_font_size_tablet=&#8221;40&#8243; title_font_size_phone=&#8221;35&#8243; title_font_size_last_edited=&#8221;on|desktop&#8221; title_text_color=&#8221;rgba(0,0,0,0.8)&#8221; title_text_align=&#8221;left&#8221; text_shadow_horizontal_length=&#8221;0.08em&#8221; text_shadow_vertical_length=&#8221;0.08em&#8221; text_shadow_blur_strength=&#8221;0.08em&#8221; title_text_shadow_horizontal_length=&#8221;0.08em&#8221; title_text_shadow_vertical_length=&#8221;0.08em&#8221; custom_margin=&#8221;|||10%&#8221; \/][\/et_pb_column][\/et_pb_row][et_pb_row][et_pb_column type=&#8221;4_4&#8243;][et_pb_text _builder_version=&#8221;3.0.106&#8243; background_layout=&#8221;light&#8221; text_font=&#8221;Titillium Web|300|||||||&#8221; text_font_size=&#8221;20&#8243; text_font_size_last_edited=&#8221;on|desktop&#8221; text_text_color=&#8221;rgba(0,0,0,0.8)&#8221; text_line_height=&#8221;1.6em&#8221; max_width=&#8221;800px&#8221; custom_margin=&#8221;|||10%&#8221; text_line_height_last_edited=&#8221;off|phone&#8221; max_width_last_edited=&#8221;off|phone&#8221; custom_margin_last_edited=&#8221;off|desktop&#8221;]\r\n<div class=\"article__body\">\r\n\r\n<strong>1) What are the components of the physical database structure of Oracle database?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Oracle database is comprised of three types of files. One or more datafiles, two are more redo log files, and one or more control files.\r\n\r\n<hr \/>\r\n\r\n<strong>2) What are the components of the logical database structure of Oracle database?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>There are tablespaces and database&#8217;s schema objects.\r\n\r\n<hr \/>\r\n\r\n<strong>3) What is a tablespace?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>A database is divided into Logical Storage Unit called tablespaces. A tablespace is used to grouped related logical structures together.\r\n\r\n<hr \/>\r\n\r\n<strong>4) What is SYSTEM tablespace and when is it created?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Every Oracle database contains a tablespace named SYSTEM, which is automatically created when the database is created. The SYSTEM tablespace always contains the data dictionary tables for the entire database.\r\n\r\n<hr \/>\r\n\r\n<strong>5) Explain the relationship between database, tablespace and data file.\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Each database logically divided into one or more tablespaces one or more data files are explicitly created for each tablespace.\r\n\r\n<hr \/>\r\n\r\n<strong>6) What is schema?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>A schema is a collection of database objects of a user.\r\n\r\n<hr \/>\r\n\r\n<strong>7) What are Schema Objects?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Schema objects are the logical structures that directly refer to the database&#8217;s data. Schema objects include tables, views, sequences, synonyms, indexes, clusters, database triggers, procedures, functions packages and database links.\r\n\r\n<hr \/>\r\n\r\n<strong>8) Can objects of the same schema reside in different table spaces<\/strong><strong>?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Yes.\r\n\r\n<hr \/>\r\n\r\n<strong>9) Can a tablespace hold objects from different schemes?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Yes.\r\n\r\n<hr \/>\r\n\r\n<strong>10) What is Oracle table?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>A table is the basic unit of data storage in an Oracle database. The tables of a database hold all of the user accessible data. Table data is stored in rows and columns.\r\n\r\n<hr \/>\r\n\r\n<strong>11) What is an Oracle view?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>A view is a virtual table. Every view has a query attached to it. (The query is a SELECT statement that identifies the columns and rows of the table(s) the view uses.)\r\n\r\n<hr \/>\r\n\r\n<strong>12) Do a view contain data?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Views do not contain or store data.\r\n\r\n<hr \/>\r\n\r\n<strong>13) Can a view based on another view?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Yes.\r\n\r\n<hr \/>\r\n\r\n<strong>14) What are the advantages of views?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Provide an additional level of table security, by restricting access to a predetermined set of rows and columns of a table.\r\n\r\n&#8211; Hide data complexity.\r\n\r\n&#8211; Simplify commands for the user.\r\n\r\n&#8211; Present the data in a different perspective from that of the base table.\r\n\r\n&#8211; Store complex queries.\r\n\r\n<hr \/>\r\n\r\n<strong>15) What is an Oracle sequence?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>A sequence generates a serial list of unique numbers for numerical columns of a database&#8217;s tables.\r\n\r\n<hr \/>\r\n\r\n<strong>16)\u00a0What is a synonym?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>A synonym is an alias for a table, view, sequence or program unit.\r\n\r\n<hr \/>\r\n\r\n<strong>17) What are the types of synonyms?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>There are two types of synonyms private and public.\r\n\r\n<hr \/>\r\n\r\n<strong>18) What is a private synonym?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Only its owner can access a private synonym.\r\n\r\n<hr \/>\r\n\r\n<strong>19) What is a public synonym?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Any database user can access a public synonym.\r\n\r\n<hr \/>\r\n\r\n<strong>20) What are synonyms used for?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0M<\/strong>ask the real name and owner of an object.\r\n\r\n&#8211; Provide public access to an object\r\n\r\n&#8211; Provide location transparency for tables, views or program units of a remote database.\r\n\r\n&#8211; Simplify the SQL statements for database users.\r\n\r\n<hr \/>\r\n\r\n<strong>21) What is an Oracle index?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>An index is an optional structure associated with a table to have direct access to rows, which can be created to increase the performance of data retrieval. Index can be created on one or more columns of a table.\r\n\r\n<hr \/>\r\n\r\n<strong>22) How are the index updates?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Indexes are automatically maintained and used by Oracle. Changes to table data are automatically incorporated into all relevant indexes.\r\n\r\n<hr \/>\r\n\r\n<strong>23)\u00a0What are clusters?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Clusters are groups of one or more tables physically stores together to share common columns and are often used together.\r\n\r\n<hr \/>\r\n\r\n<strong>24)\u00a0What is cluster key?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0The related columns of the tables in a cluster are called the cluster key.\r\n\r\n<hr \/>\r\n\r\n<strong>25) What is index cluster?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>A cluster with an index on the cluster key.\r\n\r\n<hr \/>\r\n\r\n<strong>26)\u00a0What is hash cluster?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0A row is stored in a hash cluster based on the result of applying a hash function to the row&#8217;s cluster key value. All rows with the same hash key value are stores together on disk.\r\n\r\n<hr \/>\r\n\r\n<strong>27)\u00a0When can hash cluster used?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Hash clusters are better choice when a table is often queried with equality queries. For such queries the specified cluster key value is hashed. The resulting hash key value points directly to the area on disk that stores the specified rows.\r\n\r\n<hr \/>\r\n\r\n<strong>28) What is database link?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0A database link is a named object that describes a &#8220;path&#8221; from one database to another.\r\n\r\n<hr \/>\r\n\r\n<strong>29)\u00a0What are the types of database links?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Private database link, public database link &amp; network database link.\r\n\r\n<hr \/>\r\n\r\n<strong>30)\u00a0What is private database link?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Private database link is created on behalf of a specific user. A private database link can be used only when the owner of the link specifies a global object name in a SQL statement or in the definition of the owner&#8217;s views or procedures.\r\n\r\n<hr \/>\r\n\r\n<strong>31)\u00a0What is public database link?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Public database link is created for the special user group PUBLIC. A public database link can be used when any user in the associated database specifies a global object name in a SQL statement or object definition.\r\n\r\n<hr \/>\r\n\r\n<strong>32)\u00a0 What is network database link?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Network database link is created and managed by a network domain service. A network database link can be used when any user of any database in the network specifies a global object name in a SQL statement or object definition.\r\n\r\n<hr \/>\r\n\r\n<strong>33)\u00a0What is data block?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Oracle database&#8217;s data is stored in data blocks. One data block corresponds to a specific number of bytes of physical database space on disk.\r\n\r\n<hr \/>\r\n\r\n<strong>34)\u00a0How to define data block size?\u00a0<\/strong>\r\n\r\n<strong>Ans<\/strong>: A data block size is specified for each Oracle database when the database is created. A database users and allocated free database space in Oracle data blocks. Block size is specified in init.ora file and cannot be changed latter.\r\n\r\n<hr \/>\r\n\r\n<strong>35) What is row chaining?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>In circumstances, all of the data for a row in a table may not be able to fit in the same data block. When this occurs, the data for the row is stored in a chain of data block (one or more) reserved for that segment.\r\n\r\n<hr \/>\r\n\r\n<strong>36)\u00a0What is an extent?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0An extent is a specific number of contiguous data blocks, obtained in a single allocation and used to store a specific type of information.\r\n\r\n<hr \/>\r\n\r\n<strong>37)\u00a0 What is a segment?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>A segment is a set of extents allocated for a certain logical structure.\r\n\r\n<hr \/>\r\n\r\n<strong>38)\u00a0What are the different types of segments?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Data segment, index segment, rollback segment and temporary segment.\r\n\r\n<hr \/>\r\n\r\n<strong>39)\u00a0What is a data segment?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Each non-clustered table has a data segment. All of the table&#8217;s data is stored in the extents of its data segment. Each cluster has a data segment. The data of every table in the cluster is stored in the cluster&#8217;s data segment.\r\n\r\n<hr \/>\r\n\r\n<strong>40)\u00a0What is an index segment?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Each index has an index segment that stores all of its data.\r\n\r\n<hr \/>\r\n\r\n<strong>41)\u00a0What is rollback segment?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>A database contains one or more rollback segments to temporarily store &#8220;undo&#8221; information.\r\n\r\n<hr \/>\r\n\r\n<strong>42)\u00a0What are the uses of rollback segment?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0To generate read-consistent database information during database recovery and to rollback uncommitted transactions by the users.\r\n\r\n<hr \/>\r\n\r\n<strong>43)\u00a0What is a temporary segment?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Temporary segments are created by Oracle when a SQL statement needs a temporary work area to complete execution. When the statement finishes execution, the temporary segment extents are released to the system for future use.\r\n\r\n<hr \/>\r\n\r\n<strong>44)\u00a0What is a datafile?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Every Oracle database has one or more physical data files. A database&#8217;s data files contain all the database data. The data of logical database structures such as tables and indexes is physically stored in the data files allocated for a database.\r\n\r\n<hr \/>\r\n\r\n<strong>45)\u00a0What are the characteristics of data files?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0A data file can be associated with only one database. Once created a data file can&#8217;t change size. One or more data files form a logical unit of database storage called a tablespace.\r\n\r\n<hr \/>\r\n\r\n<strong>46)\u00a0What is a redo log?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0The set of redo log files for a database is collectively known as the database redo log.\r\n\r\n<hr \/>\r\n\r\n<strong>47)\u00a0What is the function of redo log?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>The primary function of the redo log is to record all changes made to data.\r\n\r\n<hr \/>\r\n\r\n<strong>48)\u00a0What is the use of redo log information?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>The information in a redo log file is used only to recover the database from a system or media failure prevents database data from being written to a database&#8217;s data files.\r\n\r\n<hr \/>\r\n\r\n<strong>49)\u00a0What does a control file contains?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\r\n\r\n&#8211; Database name\r\n\r\n&#8211; Names and locations of a database&#8217;s files and redolog files.\r\n\r\n&#8211; Time stamp of database creation.\r\n\r\n<hr \/>\r\n\r\n<strong>50)\u00a0What is the use of control file?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>When an instance of an Oracle database is started, its control file is used to identify the database and redo log files that must be opened for database operation to proceed. It is also used in database recovery.\r\n\r\nData Base Administration\r\n\r\n<hr \/>\r\n\r\n<strong>51)\u00a0What is a database instance? Explain. \u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0A database instance (Server) is a set of memory structure and background processes that access a set of database files. The processes can be shared by all of the users.\r\n\r\nThe memory structure that is used to store the most queried data from database. This helps up to improve database performance by decreasing the amount of I\/O performed against data file.\r\n\r\n<hr \/>\r\n\r\n<strong>52)\u00a0What is Parallel Server?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Multiple instances accessing the same database (only in multi-CPU environments)\r\n\r\n<hr \/>\r\n\r\n<strong>53) What is a schema?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>The set of objects owned by user account is called the schema.\r\n\r\n<hr \/>\r\n\r\n<strong>54)\u00a0 What is an index? How it is implemented in Oracle database?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0An index is a database structure used by the server to have direct access of a row in a table. An index is automatically created when a unique of primary key constraint clause is specified in create table command\r\n\r\n<hr \/>\r\n\r\n<strong>55)\u00a0What are clusters?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Group of tables physically stored together because they share common columns and are often used together is called cluster.\r\n\r\n<hr \/>\r\n\r\n<strong>56)\u00a0What is a cluster key?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>The related columns of the tables are called the cluster key.\u00a0 The cluster key is indexed using a cluster index and its value is stored only once for multiple tables in the cluster.\r\n\r\n<hr \/>\r\n\r\n<strong>57)\u00a0What is the basic element of base configuration of an Oracle database?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0It consists of\r\n\r\none or more data files.\r\n\r\none or more control files.\r\n\r\ntwo or more redo log files.\r\n\r\nThe Database contains\r\n\r\nmultiple users\/schemas\r\n\r\none or more rollback segments\r\n\r\none or more tablespaces\r\n\r\nData dictionary tables\r\n\r\nUser objects (table,indexes,views etc.,)\r\n\r\nThe server that access the database consists of\r\n\r\nSGA (Database buffer, Dictionary Cache Buffers, Redo log buffers, Shared SQL pool)\r\n\r\nSMON (System MONito)\r\n\r\nPMON (Process MONitor)\r\n\r\nLGWR (LoG\u00a0 Write)\r\n\r\nDBWR (Data Base Write)\r\n\r\nARCH (ARCHiver)\r\n\r\nCKPT\u00a0 (Check Point)\r\n\r\nRECO\r\n\r\nDispatcher\r\n\r\nUser Process with associated PGS\r\n\r\n<hr \/>\r\n\r\n<strong>58)\u00a0What is a deadlock? Explain.\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Two processes waiting to update the rows of a table, which are locked by other processes then deadlock arises.\r\n\r\nIn a database environment this will often happen because of not issuing the proper row lock commands. Poor design of front-end application may cause this situation and the performance of server will reduce drastically.\r\n\r\nThese locks will be released automatically when a commit\/rollback operation performed or any one of this processes being killed externally.\r\n\r\nMemory Management\r\n\r\n<hr \/>\r\n\r\n<strong>59) What is SGA? \u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0The System Global Area in an Oracle database is the area in memory to facilitate the transfer of information between users. It holds the most recently requested structural information between users. It holds the most recently requested structural information about the database. The structure is database buffers, dictionary cache, redo log buffer and shared pool area.\r\n\r\n<hr \/>\r\n\r\n<strong>60)\u00a0What is a shared pool?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>The data dictionary cache is stored in an area in SGA called the shared pool. This will allow sharing of parsed SQL statements among concurrent users.\r\n\r\n<hr \/>\r\n\r\n<strong>61)\u00a0What is mean by Program Global Area (PGA)?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>It is area in memory that is used by a single Oracle user process.\r\n\r\n<hr \/>\r\n\r\n<strong>62)\u00a0What is a data segment?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Data segment are the physical areas within a database block in which the data associated with tables and clusters are stored.\r\n\r\n<hr \/>\r\n\r\n<strong>63)\u00a0What are the factors causing the reparsing of SQL statements in SGA?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Due to insufficient shared pool size.\r\n\r\nMonitor the ratio of the reloads takes place while executing SQL statements. If the ratio is greater than 1 then increase the SHARED_POOL_SIZE.\r\n\r\nDatabase Logical &amp; Physical Architecture\r\n\r\n<hr \/>\r\n\r\n<strong>\u00a064)\u00a0What is Database Buffers?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Database buffers are cache in the SGA used to hold the data blocks that are read from the data segments in the database such as tables, indexes and clusters DB_BLOCK_BUFFERS parameter in INIT.ORA decides the size.\r\n\r\n<hr \/>\r\n\r\n<strong>65)\u00a0What is dictionary cache?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Dictionary cache is information about the database objects stored in a data dictionary table.\r\n\r\n<hr \/>\r\n\r\n<strong>66)\u00a0What is meant by recursive hints?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Number of times processes repeatedly query the dictionary table is called recursive hints. It is due to the data dictionary cache is too small. By increasing the SHARED_POOL_SIZE parameter we can optimize the size of data dictionary cache.\r\n\r\n<hr \/>\r\n\r\n<strong>67)\u00a0What is redo log buffer?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Changes made to the records are written to the on-line redo log files. So that they can be used in roll forward operations during database recoveries. Before writing them into the redo log files, they will first brought to redo log buffers in SGA and LGWR will write into files frequently. LOG_BUFFER parameter will decide the size.\r\n\r\n<hr \/>\r\n\r\n<strong>68)\u00a0How will you swap objects into a different table space for an existing database?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\r\n\r\n&#8211; Export the user\r\n\r\n&#8211; Perform import using the command imp system\/manager file=export.dmp indexfile=newrite.sql. This will create all definitions into newfile.sql.\r\n\r\n&#8211; Drop necessary objects.\r\n\r\n&#8211; Run the script newfile.sql after altering the tablespaces.\r\n\r\n&#8211; Import from the backup for the necessary objects.\r\n\r\n<hr \/>\r\n\r\n<strong>69)\u00a0List the Optional Flexible Architecture (OFA) of Oracle database?\u00a0 How can we organize the tablespaces in Oracle database to have maximum performance?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>SYSTEM &#8211; Data dictionary tables.\r\n\r\nDATA\u00a0 &#8211; Standard operational tables.\r\n\r\nDATA2- Static tables used for standard operations\r\n\r\nINDEXES &#8211; Indexes for Standard operational tables.\r\n\r\nINDEXES1 &#8211; Indexes of static tables used for standard operations.\r\n\r\nTOOLS &#8211; Tools table.\r\n\r\nTOOLS1 &#8211; Indexes for tools table.\r\n\r\nRBS &#8211; Standard Operations Rollback Segments,\r\n\r\nRBS1,RBS2 &#8211; Additional\/Special Rollback segments.\r\n\r\nTEMP &#8211; Temporary purpose tablespace\r\n\r\nTEMP_USER &#8211; Temporary tablespace for users.\r\n\r\nUSERS &#8211; User tablespace.\r\n\r\n<hr \/>\r\n\r\n<strong>70)\u00a0How will you force database to use particular rollback segment?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0SET TRANSACTION USE ROLLBACK SEGMENT rbs_name.\r\n\r\n<hr \/>\r\n\r\n<strong>71)\u00a0What is meant by free extent?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0A free extent is a collection of continuous free blocks in tablespace. When a segment is dropped its extents are reallocated and are marked as free.\r\n\r\n<hr \/>\r\n\r\n<strong>72) Which parameter in Storage clause will reduce number of rows per block?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0PCTFREE parameter\r\n\r\nRow size also reduces no of rows per block.\r\n\r\n<hr \/>\r\n\r\n<strong>73) What is the significance of having storage clause?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>We can plan the storage for a table as how much initial extents are required, how much can be extended next, how much % should leave free for managing row updating, etc.,\r\n\r\n<hr \/>\r\n\r\n<strong>74)\u00a0How does Space allocation table place within a block?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Each block contains entries as follows\r\n\r\nFixed block header\r\n\r\nVariable block header\r\n\r\nRow Header, row date (multiple rows may exists)\r\n\r\nPCTEREE (% of free space for row updating in future)\r\n\r\n<hr \/>\r\n\r\n<strong>75)\u00a0What is the role of PCTFREE parameter is storage clause?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0This is used to reserve certain amount of space in a block for expansion of rows.\r\n\r\n<hr \/>\r\n\r\n<strong>76)\u00a0What is the OPTIMAL parameter?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0It is used to set the optimal length of a rollback segment.\r\n\r\n<hr \/>\r\n\r\n<strong>77)\u00a0What is the functionality of SYSTEM table space?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>To manage the database level transactions such as modifications of the data dictionary table that record information about the free space usage.\r\n\r\n<hr \/>\r\n\r\n<strong>78)\u00a0How will you create multiple rollback segments in a database?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\r\n\r\n&#8211; Create a database, which implicitly creates a SYSTEM rollback segment in a SYSTEM tablespace.\r\n\r\n&#8211; Create a second rollback segment name R0 in the SYSTEM tablespace.\r\n\r\n&#8211; Make new rollback segment available (after shutdown, modify init.ora file and start database)\r\n\r\n&#8211; Create other tablespaces (RBS) for rollback segments.\r\n\r\n&#8211; Deactivate rollback segment R0 and activate the newly created rollback segments.\r\n\r\n<hr \/>\r\n\r\n<strong>79)\u00a0How the space utilization takes place within rollback segments?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>It will try to fit the transaction in a cyclic fashion to all existing extents. Once it found an extent is in use then it forced to acquire a new extent (number of extents is based on the optimal size)\r\n\r\n<hr \/>\r\n\r\n<strong>80)\u00a0Why query fails sometimes?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Rollback segment dynamically extent to handle larger transactions entry loads.\r\n\r\nA single transaction may wipeout all available free space in the rollback segment tablespace. This prevents other user using rollback segments.\r\n\r\n<hr \/>\r\n\r\n<strong>81)\u00a0How will you monitor the space allocation?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0By querying DBA_SEGMENT table\/view\r\n\r\n<hr \/>\r\n\r\n<strong>82)\u00a0How will you monitor rollback segment status?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Querying the DBA_ROLLBACK_SEGS view\r\n\r\nIN USE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 &#8211; Rollback Segment is on-line.\r\n\r\nAVAILABLE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8211; Rollback Segment available but not on-line.\r\n\r\nOFF-LINE\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&#8211; Rollback Segment off-line\r\n\r\nINVALID\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &#8211; Rollback Segment Dropped.\r\n\r\nNEEDS RECOVERY\u00a0 \u00a0 \u00a0 &#8211; Contains data but need recovery or corrupted.\r\n\r\nPARTLY AVAILABLE\u00a0 \u00a0 \u00a0 \u00a0&#8211; Contains data from an unresolved transaction involving a\r\n\r\ndistributed database.\r\n\r\n<hr \/>\r\n\r\n<strong>83)\u00a0List the sequence of events when a large transaction that exceeds beyond its optimal value when an entry wraps and causes the rollback segment to expand into another extend.\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Transaction Begins.\r\n\r\nAn entry is made in the RES header for new transactions entry\r\n\r\nTransaction acquires blocks in an extent of RBS\r\n\r\nThe entry attempts to wrap into second extent. None is available, so that the RBS must extent.\r\n\r\nThe RBS checks to see if it is part of its OPTIMAL size.\r\n\r\nRBS chooses its oldest inactive segment.\r\n\r\nOldest inactive segment is eliminated.\r\n\r\nRBS extents\r\n\r\nThe data dictionary tables for space management are updated.\r\n\r\nTransaction Completes.\r\n\r\n<hr \/>\r\n\r\n<strong>84)\u00a0How can we plan storage for very large tables?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Limit the number of extents in the table\r\n\r\nSeparate table from its indexes.\r\n\r\nAllocate sufficient temporary storage.\r\n\r\n<hr \/>\r\n\r\n<strong>85)\u00a0How will you estimate the space required by a non-clustered table?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Calculate the total header size\r\n\r\nCalculate the available data space per data block\r\n\r\nCalculate the combined column lengths of the average row\r\n\r\nCalculate the total average row size.\r\n\r\nCalculate the average number rows that can fit in a block\r\n\r\nCalculate the number of blocks and bytes required for the table.\r\n\r\nAfter arriving the calculation, add 10 % additional space to calculate the initial extent size for a working table.\r\n\r\n<hr \/>\r\n\r\n<strong>86)\u00a0It is possible to use raw devices as data files and what are the advantages over file system files?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Yes.\r\n\r\nThe advantages over file system files are that I\/O will be improved because Oracle is bye-passing the kernel which writing into disk. Disk corruption will be very less.\r\n\r\n<hr \/>\r\n\r\n<strong>87)\u00a0What is a Control file?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Database&#8217;s overall physical architecture is maintained in a file called control file. It will be used to maintain internal consistency and guide recovery operations. Multiple copies of control files are advisable.\r\n\r\n<hr \/>\r\n\r\n<strong>88)\u00a0How to implement the multiple control files for an existing database?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Shutdown the database\r\n\r\nCopy one of the existing control file to new location\r\n\r\nEdit Config ora file by adding new control filename\r\n\r\nRestart the database.\r\n\r\n<hr \/>\r\n\r\n<strong>89)\u00a0What is redo log file mirroring? \u00a0How can be achieved?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Process of having a copy of redo log files is called mirroring.\r\n\r\nThis can be achieved by creating group of log files together, so that LGWR will automatically writes them to all the members of the current on-line redo log group. If any one group fails then database automatically switch over to next group. It degrades performance.\r\n\r\n<hr \/>\r\n\r\n<strong>90)\u00a0What is advantage of having disk shadowing \/ mirroring?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Shadow set of disks save as a backup in the event of disk failure. In most operating systems if any disk failure occurs it automatically switchover to place of failed disk.\r\n\r\nImproved performance because most OS support volume shadowing can direct file I\/O request to use the shadow set of files instead of the main set of files. This reduces I\/O load on the main set of disks.\r\n\r\n<hr \/>\r\n\r\n<strong>91)\u00a0What is use of rollback segments in Oracle database?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0They allow the database to maintain read consistency between multiple transactions.\r\n\r\n<hr \/>\r\n\r\n<strong>92)\u00a0What is a rollback segment entry?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0It is the set of before image data blocks that contain rows that are modified by a transaction.\r\n\r\nEach rollback segment entry must be completed within one rollback segment.\r\n\r\nA single rollback segment can have multiple rollback segment entries.\r\n\r\n<hr \/>\r\n\r\n<strong>93)\u00a0What is hit ratio?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0It is a measure of well the data cache buffer is handling requests for data.\r\n\r\nHit Ratio = (Logical Reads &#8211; Physical Reads &#8211; Hits Misses)\/ Logical Reads.\r\n\r\n<hr \/>\r\n\r\n<strong>94)\u00a0When will be a segment released?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0When Segment is dropped.\r\n\r\nWhen Shrink (RBS only)\r\n\r\nWhen truncated (TRUNCATE used with drop storage option)\r\n\r\n<hr \/>\r\n\r\n<strong>95)\u00a0What are disadvantages of having raw devices?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>We should depend on export\/import utility for backup\/recovery (fully reliable)\r\n\r\nThe tar command cannot be used for physical file backup, instead we can use dd command, which is less flexible and has limited recoveries.\r\n\r\n<hr \/>\r\n\r\n<strong>96)\u00a0List the factors that can affect the accuracy of the estimations?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\r\n\r\n&#8211; The space used transaction entries and deleted records, does not become free immediately after completion due to delayed cleanout.\r\n\r\n&#8211; Trailing nulls and length bytes are not stored.\r\n\r\n&#8211; Inserts of, updates to and deletes of rows as well as columns larger than a single data block, can cause fragmentation a chained row pieces.\r\n\r\nDatabase Security &amp; Administration\r\n\r\n<hr \/>\r\n\r\n<strong>97)\u00a0What is user Account in Oracle database?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0A user account is not a physical structure in database but it is having important relationship to the objects in the database and will be having certain privileges.\r\n\r\n<hr \/>\r\n\r\n<strong>98)\u00a0How will you enforce security using stored procedures?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Don&#8217;t grant user access directly to tables within the application.\r\n\r\nInstead grant the ability to access the procedures that access the tables.\r\n\r\nWhen procedure executed it will execute the privilege of procedures owner. Users cannot access tables except via the procedure.\r\n\r\n<hr \/>\r\n\r\n<strong>99)\u00a0What are the dictionary tables used to monitor a database space?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\r\n\r\nDBA_FREE_SPACE\r\n\r\nDBA_SEGMENTS\r\n\r\nDBA_DATA_FILES.\r\n\r\nSQL*Plus Statements\r\n\r\n<hr \/>\r\n\r\n<strong>100)\u00a0What are the types of SQL statement?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\r\n\r\nData Definition Language: CREATE, ALTER, DROP, TRUNCATE, REVOKE, NO AUDIT &amp; COMMIT.\r\n\r\nData Manipulation Language: INSERT, UPDATE, DELETE, LOCK TABLE, EXPLAIN PLAN &amp; SELECT.\r\n\r\nTransactional Control: COMMIT &amp; ROLLBACK\r\n\r\nSession Control: ALTERSESSION &amp; SET ROLE\r\n\r\nSystem Control: ALTER SYSTEM.\r\n\r\n<hr \/>\r\n\r\n<strong>101)\u00a0What is a transaction?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Transaction is logical unit between two commits and commit and rollback.\r\n\r\n<hr \/>\r\n\r\n<strong>102)\u00a0What is difference between TRUNCATE &amp; DELETE?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0TRUNCATE commits after deleting entire table i.e., cannot be rolled back.\r\n\r\nDatabase triggers do not fire on TRUNCATE\r\n\r\nDELETE allows the filtered deletion. Deleted records can be rolled back or committed.\r\n\r\nDatabase triggers fire on DELETE.\r\n\r\n<hr \/>\r\n\r\n<strong>103)\u00a0What is a join? Explain the different types of joins?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Join is a query, which retrieves related columns or rows from multiple tables.\r\n\r\nSelf Join &#8211; Joining the table with itself.\r\n\r\nEqui Join &#8211; Joining two tables by equating two common columns.\r\n\r\nNon-Equi Join &#8211; Joining two tables by equating two common columns.\r\n\r\nOuter Join &#8211; Joining two tables in such a way that query can also retrieve rows that do not have corresponding join value in the other table.\r\n\r\n<hr \/>\r\n\r\n<strong>104)\u00a0What is the sub-query?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Sub-query is a query whose return values are used in filtering conditions of the main query.\r\n\r\n<hr \/>\r\n\r\n<strong>105)\u00a0What is correlated sub-query?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Correlated sub-query is a sub-query, which has reference to the main query.\r\n\r\n<hr \/>\r\n\r\n<strong>106)\u00a0Explain CONNECT BY PRIOR?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Retrieves rows in hierarchical order eg.\r\n\r\nselect empno, ename from emp where.\r\n\r\n<hr \/>\r\n\r\n<strong>107)\u00a0Difference between SUBSTR and INSTR?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>INSTR (String1, String2 (n, (m)),\r\n\r\nINSTR returns the position of the m-th occurrence of the string 2 in string1. The search begins from nth position of string1.\r\n\r\nSUBSTR (String1 n, m)\r\n\r\nSUBSTR returns a character string of size m in string1, starting from n-th position of string1.\r\n\r\n<hr \/>\r\n\r\n<strong>108)\u00a0Explain UNION, MINUS, UNION ALL and INTERSECT?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\r\n\r\nINTERSECT\u00a0\u00a0 &#8211; returns all distinct rows selected by both queries.\r\n\r\nMINUS\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8211; returns all distinct rows selected by the first query but not by the second.\r\n\r\nUNION\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8211; returns all distinct rows selected by either query\r\n\r\nUNION ALL\u00a0\u00a0\u00a0 &#8211; returns all rows selected by either query, including all duplicates.\r\n\r\n<hr \/>\r\n\r\n<strong>109) What is ROWID?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>ROWID is a pseudo column attached to each row of a table. It is 18 characters long, blockno, rownumber are the components of ROWID.\r\n\r\n<hr \/>\r\n\r\n<strong>110)\u00a0What is the fastest way of accessing a row in a table?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Using ROWID.\r\n\r\nCONSTRAINTS\r\n\r\n<hr \/>\r\n\r\n<strong>111)\u00a0What is an integrity constraint?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Integrity constraint is a rule that restricts values to a column in a table.\r\n\r\n<hr \/>\r\n\r\n<strong>112)\u00a0What is referential integrity constraint?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Maintaining 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.\r\n\r\n<hr \/>\r\n\r\n<strong>113) What is the usage of SAVEPOINTS? \u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0SAVEPOINTS are used to subdivide a transaction into smaller parts. It enables rolling back part of a transaction. Maximum of five save points are allowed.\r\n\r\n<hr \/>\r\n\r\n<strong>114)\u00a0 What is ON DELETE CASCADE?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0When 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.\r\n\r\n<hr \/>\r\n\r\n<strong>115)\u00a0What are the data types allowed in a table?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>CHAR, VARCHAR2, NUMBER, DATE, RAW, LONG and LONG RAW.\r\n\r\n<hr \/>\r\n\r\n<strong>116)\u00a0What is difference between CHAR and VARCHAR2?\u00a0 What is the maximum SIZE allowed for each type?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\r\n\r\nCHAR pads blank spaces to the maximum length.\r\n\r\nVARCHAR2 does not pad blank spaces.\r\n\r\nFor CHAR the maximum length is 255 and 2000 for VARCHAR2.\r\n\r\n<hr \/>\r\n\r\n<strong>117)\u00a0 How many LONG columns are allowed in a table? Is it possible to use LONG columns in WHERE clause or ORDER BY?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Only one LONG column is allowed. It is not possible to use LONG column in WHERE or ORDER BY clause.\r\n\r\n<hr \/>\r\n\r\n<strong>118)\u00a0What are the pre-requisites to modify datatype of a column and to add a column with NOT NULL constraint?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>\r\n\r\n&#8211; To modify the datatype of a column the column must be empty.\r\n\r\n&#8211; To add a column with NOT NULL constrain, the table must be empty.\r\n\r\n<hr \/>\r\n\r\n<strong>119)\u00a0Where the integrity constraints are stored in data dictionary?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>The integrity constraints are stored in USER_CONSTRAINTS.\r\n\r\n<hr \/>\r\n\r\n<strong>120) How will you activate\/deactivate integrity constraints?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>The integrity constraints can be enabled or disabled by ALTER TABLE ENABLE CONSTRAINT \/ DISABLE CONSTRAINT.\r\n\r\n<hr \/>\r\n\r\n<strong>121) If unique key constraint on DATE column is created, will it validate the rows that are inserted with SYSDATE?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0It won&#8217;t, Because SYSDATE format contains time attached with it.\r\n\r\n<hr \/>\r\n\r\n<strong>122)\u00a0What is a database link?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Database link is a named path through which a remote database can be accessed.\r\n\r\n<hr \/>\r\n\r\n<strong>123)\u00a0How 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?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Sequence name CURRVAL, sequence name NEXTVAL. It is not possible. Only if you access next value in the session, the current value can be accessed.\r\n\r\n<hr \/>\r\n\r\n<strong>124) What is CYCLE\/NO CYCLE in a Sequence?\u00a0<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>CYCLE specifies that the sequence continues 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 sequence reaches its minimum, it generates its maximum.\r\n\r\nNO CYCLE specifies that the sequence cannot generate more values after reaching its maximum or minimum value.\r\n\r\n<hr \/>\r\n\r\n<strong>125)\u00a0What are the advantages of VIEW?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\r\n\r\n&#8211; To protect some of the columns of a table from other users.\r\n\r\n&#8211; To hide the complexity of a query.\r\n\r\n&#8211; To hide the complexity of calculations.\r\n\r\n<hr \/>\r\n\r\n<strong>126)\u00a0Can a view be updated\/inserted\/deleted? If Yes &#8211; under what conditions?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0A 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.\r\n\r\n<hr \/>\r\n\r\n<strong>127)\u00a0If a view on a single base table is manipulated will the changes be reflected in the base table?\u00a0<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0If changes are made to the tables and these tables are the base tables of a view, then the changes will be referenced in the view.\r\n\r\n<\/div>\r\n[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section bb_built=&#8221;1&#8243; prev_background_color=&#8221;#000000&#8243;][et_pb_row][et_pb_column type=&#8221;4_4&#8243;][et_pb_team_member _builder_version=&#8221;3.0.106&#8243; name=&#8221;Chandanakatta&#8221; position=&#8221;Author&#8221; facebook_url=&#8221;&#8221; twitter_url=&#8221;&#8221; google_url=&#8221;&#8221; linkedin_url=&#8221;&#8221; background_layout=&#8221;light&#8221; image_url=&#8221;https:\/\/asha24.net\/blog\/\/wp-content\/uploads\/2018\/03\/portraits-circle-small_1.png&#8221; header_font=&#8221;Titillium Web|700|||||||&#8221; body_font=&#8221;Titillium Web||||||||&#8221; body_font_size=&#8221;16&#8243; body_font_size_last_edited=&#8221;on|desktop&#8221; disabled=&#8221;off&#8221; disabled_on=&#8221;off|off|&#8221;]\r\n\r\nHey there! I shoot some hoops when I\u2019m not drowned in the books, sitting by the side of brooks.\r\n\r\n[\/et_pb_team_member][\/et_pb_column][\/et_pb_row][\/et_pb_section]\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":4,"featured_media":48141,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"<p>[et_pb_section bb_built=\"1\"][et_pb_row][et_pb_column type=\"4_4\"][et_pb_post_title _builder_version=\"3.0.106\" title=\"on\" meta=\"off\" author=\"on\" date=\"on\" categories=\"on\" comments=\"on\" featured_image=\"off\" featured_placement=\"below\" text_color=\"dark\" text_background=\"off\" title_font=\"Titillium Web||||||||\" title_font_size=\"47\" title_font_size_tablet=\"40\" title_font_size_phone=\"35\" title_font_size_last_edited=\"on|desktop\" title_text_color=\"rgba(0,0,0,0.8)\" title_text_align=\"left\" text_shadow_horizontal_length=\"0.08em\" text_shadow_vertical_length=\"0.08em\" text_shadow_blur_strength=\"0.08em\" title_text_shadow_horizontal_length=\"0.08em\" title_text_shadow_vertical_length=\"0.08em\" custom_margin=\"|||10%\" \/][\/et_pb_column][\/et_pb_row][et_pb_row][et_pb_column type=\"4_4\"][et_pb_image _builder_version=\"3.0.105\" show_in_lightbox=\"off\" url_new_window=\"off\" use_overlay=\"off\" always_center_on_mobile=\"on\" force_fullwidth=\"on\" show_bottom_space=\"on\" \/][et_pb_text _builder_version=\"3.0.106\" background_layout=\"light\" text_font=\"Titillium Web|300|||||||\" text_font_size=\"25\" text_font_size_last_edited=\"on|phone\" text_text_color=\"rgba(0,0,0,0.8)\" text_line_height=\"1.8em\" max_width=\"800px\" custom_margin=\"|||10%\" text_line_height_last_edited=\"off|phone\" max_width_last_edited=\"off|phone\" custom_margin_last_edited=\"off|desktop\" \/][et_pb_team_member _builder_version=\"3.0.106\" name=\"Team Asha24\" position=\"Developer\" facebook_url=\"fb.com\" twitter_url=\"t.co\" google_url=\"plus.google.com\" linkedin_url=\"linked.com\" image_url=\"https:\/\/asha24.net\/blog\/\/wp-content\/uploads\/2018\/03\/portraits-circle-small_2.png\" background_layout=\"light\"]<\/p><p>Hi there! I\u2019m a bike messenger by day, aspiring actor by night. Here at Asha24, we write about latest tending technology.<\/p><p>[\/et_pb_team_member][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>","_et_gb_content_width":"","footnotes":""},"categories":[62],"tags":[58],"class_list":["post-48137","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql","tag-interview-questions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL Interview Questions and Answers - Asha24 Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Interview Questions and Answers - Asha24 Blog\" \/>\n<meta property=\"og:url\" content=\"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/\" \/>\n<meta property=\"og:site_name\" content=\"Asha24 Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-30T00:28:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-04T04:15:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/asha24.net\/blog\/wp-content\/uploads\/2018\/03\/sql-interview-questions-and-answers-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"459\" \/>\n\t<meta property=\"og:image:height\" content=\"306\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mahesh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"22 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/asha24.net\/blog\/#website\",\"url\":\"https:\/\/asha24.net\/blog\/\",\"name\":\"Asha24 Blog\",\"description\":\"Dedication Towards Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/asha24.net\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/asha24.net\/blog\/wp-content\/uploads\/2018\/03\/sql-interview-questions-and-answers-1.jpg\",\"contentUrl\":\"https:\/\/asha24.net\/blog\/wp-content\/uploads\/2018\/03\/sql-interview-questions-and-answers-1.jpg\",\"width\":459,\"height\":306},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/#webpage\",\"url\":\"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/\",\"name\":\"SQL Interview Questions and Answers - Asha24 Blog\",\"isPartOf\":{\"@id\":\"https:\/\/asha24.net\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/#primaryimage\"},\"datePublished\":\"2018-01-30T00:28:52+00:00\",\"dateModified\":\"2023-02-04T04:15:15+00:00\",\"author\":{\"@id\":\"https:\/\/asha24.net\/blog\/#\/schema\/person\/f6167b78bbaddfc399ae1154cd5b6759\"},\"breadcrumb\":{\"@id\":\"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/asha24.net\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Interview Questions and Answers\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/asha24.net\/blog\/#\/schema\/person\/f6167b78bbaddfc399ae1154cd5b6759\",\"name\":\"Mahesh\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/asha24.net\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/085c03e75ffb51af2509c1cfad9c7d78b30236d43a008db2e46f96e2f40c67fc?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/085c03e75ffb51af2509c1cfad9c7d78b30236d43a008db2e46f96e2f40c67fc?s=96&d=wavatar&r=g\",\"caption\":\"Mahesh\"},\"url\":\"https:\/\/asha24.net\/blog\/author\/mahesh\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQL Interview Questions and Answers - Asha24 Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/","og_locale":"en_US","og_type":"article","og_title":"SQL Interview Questions and Answers - Asha24 Blog","og_url":"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/","og_site_name":"Asha24 Blog","article_published_time":"2018-01-30T00:28:52+00:00","article_modified_time":"2023-02-04T04:15:15+00:00","og_image":[{"width":459,"height":306,"url":"https:\/\/asha24.net\/blog\/wp-content\/uploads\/2018\/03\/sql-interview-questions-and-answers-1.jpg","path":"\/home\/reviews981\/public_html\/asha24.net\/blog\/wp-content\/uploads\/2018\/03\/sql-interview-questions-and-answers-1.jpg","size":"full","id":48141,"alt":"","pixels":140454,"type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mahesh","Est. reading time":"22 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/asha24.net\/blog\/#website","url":"https:\/\/asha24.net\/blog\/","name":"Asha24 Blog","description":"Dedication Towards Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/asha24.net\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/#primaryimage","inLanguage":"en-US","url":"https:\/\/asha24.net\/blog\/wp-content\/uploads\/2018\/03\/sql-interview-questions-and-answers-1.jpg","contentUrl":"https:\/\/asha24.net\/blog\/wp-content\/uploads\/2018\/03\/sql-interview-questions-and-answers-1.jpg","width":459,"height":306},{"@type":"WebPage","@id":"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/#webpage","url":"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/","name":"SQL Interview Questions and Answers - Asha24 Blog","isPartOf":{"@id":"https:\/\/asha24.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/#primaryimage"},"datePublished":"2018-01-30T00:28:52+00:00","dateModified":"2023-02-04T04:15:15+00:00","author":{"@id":"https:\/\/asha24.net\/blog\/#\/schema\/person\/f6167b78bbaddfc399ae1154cd5b6759"},"breadcrumb":{"@id":"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/asha24.net\/blog\/sql-interview-questions-and-answers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/asha24.net\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL Interview Questions and Answers"}]},{"@type":"Person","@id":"https:\/\/asha24.net\/blog\/#\/schema\/person\/f6167b78bbaddfc399ae1154cd5b6759","name":"Mahesh","image":{"@type":"ImageObject","@id":"https:\/\/asha24.net\/blog\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/085c03e75ffb51af2509c1cfad9c7d78b30236d43a008db2e46f96e2f40c67fc?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/085c03e75ffb51af2509c1cfad9c7d78b30236d43a008db2e46f96e2f40c67fc?s=96&d=wavatar&r=g","caption":"Mahesh"},"url":"https:\/\/asha24.net\/blog\/author\/mahesh\/"}]}},"_links":{"self":[{"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/posts\/48137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/comments?post=48137"}],"version-history":[{"count":4,"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/posts\/48137\/revisions"}],"predecessor-version":[{"id":52223,"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/posts\/48137\/revisions\/52223"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/media\/48141"}],"wp:attachment":[{"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/media?parent=48137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/categories?post=48137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/tags?post=48137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}