SQL Objective type Question and Answers


1.       What does SQL stand for?
a.         Structured Query Language
b.         Structured Question Language
c.         Strong Question Language
Ans: a. Structured Query Language

2.       Which SQL statement is used to extract data from a database?
a.         GET
b.         OPEN
c.         EXTRACT
d.         SELECT
Ans: c. EXTRACT

3.       Which SQL statement is used to update data in a database?
a.         SAVE AS
b.         UPDATE
c.         SAVE
d.         MODIFY
Ans: b. UPDATE

4.       Which SQL statement is used to delete data from a database?
a.         COLLAPSE
b.         DELETE
c.         REMOVE
Ans: b. DELETE

5.       Key to represent relationship between tables is called
a.         Primary key
b.         Secondary Key
c.         Foreign Key
d.         None of these
Ans: C Foreign Key

6.       With SQL, how do you select a column named “FirstName” from a table named “Persons”?
a.         SELECT FirstName FROM Persons
b.         SELECT Persons.FirstName
c.         EXTRACT FirstName FROM Persons
Ans: a. SELECT FirstName FROM Persons
7.       Which of the following is a valid SQL type?
a.         CHARACTER
b.         NUMERIC
c.         FLOAT
d.         All of the above
Ans: D  All of the above

8.       With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” is “Peter”?
a.         SELECT * FROM Persons WHERE FirstName=’Peter’
b.         SELECT [all] FROM Persons WHERE FirstName=’Peter’
c.         SELECT [all] FROM Persons WHERE FirstName LIKE ‘Peter’
d.         SELECT * FROM Persons WHERE FirstName<>‘Peter’
Ans: a. SELECT * FROM Persons WHERE FirstName=’Peter’

9.       With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” starts with an “a”?
a.         SELECT * FROM Persons WHERE FirstName=’%a%’
b.         SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
c.         SELECT * FROM Persons WHERE FirstName=’a’
d.         SELECT * FROM Persons WHERE FirstName LIKE ‘%a’
Ans: d. SELECT * FROM Persons WHERE FirstName LIKE ‘%a’

10.       DML is provided for
a.       Description of logical structure of database.
b.      Addition of new structures in the database system.
c.       Manipulation & processing of database.
d.      Definition of physical structure of database system.

Ans: c  DML is provided for manipulation & processing of database.



Automata Objective Questions Answers for PGT Ip

Automata Objective Questions Answers for PGT Ip Set 1

1.       For a given input, it provides the compliment of Boolean AND output.

a.       NAND box (NOT AND)
b.       DELAY box
c.       OR box
d.       AND box

2.       It delays the transmission of signal along the wire by one step (clock pulse).

a.       NAND box (NOT AND)
b.       DELAY box
c.       OR box
d.       AND box

3.       For the given input, it provides the Boolean OR output

a.       NAND box (NOT AND)
b.       DELAY box
c.       OR box
d.       AND box

4.       For the given input, AND box provides the Boolean AND output.
a.       True
b.       False

5.       The current in the wire is indicated by 1 and 0 indicates the absence of the current.
a.       True
b.       False

6.       Any language that can not be expressed by a RE is said to be regular language.
a.       True
b.       False

7.       If L1 and L2 are regular languages is/are also regular language(s).

a.       L1 + L2
b.       L1L2
c.       L1
d.       All of above

8.       Let L be a language defined over an alphabet Σ, then the language of strings, defined over Σ, not belonging to L, is called Complement of the language L, denoted by Lc or L’.
a.       True
b.       False

9.       To describe the complement of a language, it is very important to describe the ----------- of that language over which the language is defined.

a.       Alphabet
b.       Regular Expression
c.       String
d.       Word

10.     For a certain language L, the complement of Lc is the given language L i.e. (Lc)c = Lc
a.       True
b.       False









Answers:

1
2
3
4
5
6
7
8
9
10
a
b
c
a
a
b
d
a
a
b


MS-Dos Objective Type Question and Answers for Computer Operator Exam

                                                                                                Click here... Set 1

1.    The MODE command of MS-DOS is used to
A.      display information about several types of devices installed in your computer
B.      provide various types of control over your printers
C.      make changes of the current display
D.      All of the above
E.       None of the above
Answer: Option D


2. Which of the following applies to external DOS commands?

A.      External commands reside in RAM until called
B.      External commands are stored on disk separately from COMMAND.COM
C.      External commands must always be used with the /e switch
D.      External commands can only be executed from a batch file.
E.       None of the above
Answer: Option B

3.          Which command is used to delete the directory that is empty?
A.      DEL *.*
B.      RD
C.      ERASE
D.      MD
E.       None of the above
Answer: Option B



4.  Which command will be used to display file and directory names only, without size, date, and time information?
A.      DIR/W
B.      DIR A:
C.      DIR/B
D.      DIR/S
E.       None of the above
Answer: Option C


5.  To organize files on a disk, MS-DOS separates them into areas called _____
A.      directories
B.      buckets
C.      areas
D.      area directories
E.       None of the above
Answer: Option A

6. The _____ command allows you to modify the default prompt to provide other information
A.      prompt
B.      windows
C.      cursor
D.      click
E.       None of the above
Answer: Option A


7.  What DOS program can you run to see which serial ports are detected?
A.            comdiag          
B.            MSD
C.            command.com  
D.            SDET
E.            serial.chk

Answer: Option B


8.  After doing a low-level format, what would be the next step in configuring the hard                      drive in a system?
A.      Format DOS partition
B.      Install operating system
C.      Configure DMA channel and back up interrupt
D.      Partition hard disk
E.       None of the above
Answer: Option D

9.          Which of the following commands will take you directly to the root directory no                      matter what subdirectory you are currently in?
A.      CD \root
B.      CD\
C.      CD\..
D.      CD..
E.       None of the above
Answer: Option B


10.   After trying to unload a TSR, you get an error message saying that other TSRs were                loaded after the one you tried to remove. Which of the following commands could you use                 to see the current load order?
A.      MEM /P
B.      MEMMAKER
C.      MEM /C
D.      SYS:
E.       None of the above
Answer: Option C


                         Set 1   Set 2     Set 3     Set 4      Set 5


Difference between DISTINCT versus DISTINCTROW SQL Keywords


DISTINCT : DISTINCT checks only the fields listed in the SQL string and then eliminates the duplicate rows. Results of DISTINCT queries are not updateable. They are a snapshot of the data.
DISTINCT queries are similar to Summary or Totals queries (queries using a GROUP BY clause).

DISTINCTROW: DISTINCTROW, on the other hand, checks all fields in the table that is being queried, and eliminates duplicates based on the entire record (not just the selected fields). Results of DISTINCTROW queries are updateable.

Difference between Stored Procedure and Function in SQL Server

Stored Procedures are pre-compile objects which are compiled for first time and its compiled format is saved which executes (compiled code) whenever it is called. But Function is compiled and executed every time when it is called.
Differences:
1)     Stored Procedure can return zero or n values whereas function can return one value which is mandatory.
2)      Stored Procedures can have input/output parameters for it whereas functions can have only input parameters.
3)      Stored Procedure allows select as well as DML statement in it whereas function allows only select statement in it.
4)      Functions can be called from stored procedure whereas procedures cannot be called from function.
5)      Exception can be handled by try-catch block in a Stored procedure whereas try-catch block cannot be used in a function.
6)      We can go for transaction management in Stored procedure whereas we can't go in function.
7)     Stored Procedures cannot be utilized in a select statement whereas function can be embedded in a select statement.
8)      UDF can be used in the SQL statements anywhere in the WHERE/HAVING/SELECT section where as Stored procedures cannot be.
9)      UDFs that return tables can be treated as another rowset. This can be used in JOINs with other tables.

10)  Inline UDF's can be though of as views that take parameters and can be used in JOINs and other Rowsetoperations.

MS-DOS for Computer Operator Exam

MS-DOS for Computer Operator Exam

1.       You suspect a virus has entered your computer.
            What will not be affected by the virus?
            A. CMOS
            B. Boot sector
            C.  Floppy disks
            D. Program files
            E. None of the above
           
            Answer: Option A

________________________________________

2.       What is a TSR?
            A.test status request
            B.terminate and stay resident program
            C.take status request
            D.token set ready
            E.token steady route

            Answer: Option B


________________________________________
3.       What does MSCDEX.EXE do?
            A.Configures hard drives
            B.it's a SCSI driver
            C.BIOS setup
            D.it's a CD-ROM DOS driver
            E.None of the above

            Answer: Option D


________________________________________
4.       Upper Memory blocks are located where?
            A. Conventional Memory
            B.Extended Memory
            C.Expanded memory
            D.Reserved Memory
            E.None of the above

            Answer: Option D


________________________________________
5.       Batch files contain a group of MS-DOS commands that are run in successive order.
            What filename extension identifies batch files?
            A. COM
            B.BAT
            C.EXE
            D.SYS
            E.None of the above

            Answer: Option B


________________________________________


6.       After upgrading your computer to a new DOS version, an older application displays the error message "Incorrect DOS version".      What should you do to run this application?
            A. Use the DOS+ command
            B.Use the SETVER command
            C.Restore the old DOS version
            D.Contact the application's vendor support line
            E.None of the above

            Answer: Option B


________________________________________
27.       When executed from a bootable hard drive, which command will make a formatted floppy disk bootable?
            A.COPY C:\DOS\COMMAND.COM A:\
            B.ATTRIB C:\*.SYS A:\
            C.XCOPY C:\DOS\*.* A:\
            D.SYS C: A:
            E.None of the above

            Answer: Option D


________________________________________
8.       Which of the following commands allows you to make a directory?
            A. MAKE
            B.DIR
            C.MD
            D.DD
            E.None of the above

            Answer: Option C


________________________________________
9.       While working with MS-DOS, which command is used to specify the colour display, 40 columns and color?
            A.MODE COLOUR
            B.MODE/C
            C.MODE CO40
            D.MODE CHANGE
            E.None of the above

            Answer: Option C


________________________________________
10.       Which DOS command allows you to compress existing disks and to create new compressed volumes?
            A.DEFRAG
            B.DBLSPACE
            C.SCANDISK
            D.MSAV
            E.None of the above

            Answer: Option B


Set 1   Set 2     Set 3     Set 4      Set 5

SQL Objective Question And Answers

                                                                                             

1)      Which of the following SQL clauses is used to DELETE data from a database table?

1)      REMOVE
2)      CLEAR
3)      DROP DATA
4)      DELETE


2)      If you join a table to itself, what kind of join are you using?

1.      You can't join a table to itself.
2.      Selective Join.
3.      Self Join

3)      Which of the following SQL statements has correct syntax?

1.      SELECT * FROM Table1 WHERE Column1 => 10
2.      SELECT * FROM Table1 WHERE Column1 >= 10
3.      SELECT * FROM Table1 WHERE Column1 = = 10

4)      Sub-queries can be nested in…

1.      UPDATE, DELETE, INSERT and SELECT statements.
2.      INSERT statements only.
3.      DELETE statements only.
4.      UPDATE statements only.

5)      Which SQL functions is used to count the number of rows in a SQL query?

1.      COUNT()
2.      SUM()
3.      NUMBER()

6)      What does the UNION operator do?
1.      The UNION operator combines the results of two or more queries into a one result that includes all the rows from the queries in the union.
2.      The UNION operator sorts the selected result set.
3.      The UNION operator behaves the same as the JOIN SQL clause.


7)      The SQL BETWEEN operator …

1.      Specifies that a column is a primary key.
2.      Specifies which tables we are selecting from.
3.      Specifies a range to test.


8)      What does SQL stand for?


1.      Strict Query Language
2.      Standard Query Language.
3.      Structured Query Language.
4.      Strong Query Language


9)      If you don't specify ASC or DESC after a SQL ORDER BY clause, the following is used by default:


1.      ASC
2.      There is no default value.
3.      DESC


10)    Which of the following SQL statements is correct?


1.      SELECT CustomerName, COUNT(CustomerName) FROM Orders GROUP BY CustomerName
2.      SELECT CustomerName, COUNT(CustomerName) FROM Orders ORDER BY CustomerName

3.      SELECT CustomerName, COUNT(CustomerName) FROM Orders