Showing posts with label Structured Query Language. Show all posts
Showing posts with label Structured Query Language. Show all posts

Which command will result in records that have a Col1 value greater than 100?

Which command will result in records that have a Col1 value greater than 100?



A) SELECT Col1 FROM Table1 IF Col1 GT 100
B) SELECT Col1 FROM Table1 WHERE Col1 > 100
C) SELECT Col1 > 100 FROM Table1
D) IF Col1 > 100 SELECT * FROM Table1

Answer: B) SELECT Col1 FROM Table1 WHERE Col1 > 100

Which command changes the database context?

Which command changes the database context?


A) OPEN [Database Name]
B) USE [Database Name];
C) SELECT [Database Name];
D) SWITCH [Database Name]

Answer: B) USE [Database Name];

Which of the following represents correct syntax for a SELECT statement?

Which of the following represents correct syntax for a SELECT statement?



A) SELECT [Column Name] FROM [Table Name]
B) SELECT [Object Name] FOR [Column Name];
C) SELECT [Database Name] From [Column Name];
D) SELECT [Table Name] FROM [Row Name]


Answer: A) SELECT [Column Name] FROM [Table Name]

What happens if you need to compare two values of different data types?

What happens if you need to compare two values of different data types?


A) the system is halted
B) the value with the highest precision is returned
C) an 'incompatible type' error occurs
D) a data type conversion is performed

Answer: D) a data type conversion is performed

Which of the following is true about database permissions?

Which of the following is true about database permissions?



A) access to databases is controlled by Windows logon authentication
B) database users are defined for each database
C) server-level permissions provide the least access to SQL databases
D) permissions can only be set at the server or database level

Answer: B) database users are defined for each database

Which of the following is true about the Autogrowth setting?

Which of the following is true about the Autogrowth setting?



A) by default, it doubles the size of the log file when it becomes full
B) the data file is affected by it but log files are not
C) you should keep this value as small as possible
D) you should configure it so that file growth occurs infrequently

Answer:  D) you should configure it so that file growth occurs infrequently

Which of the following is true about the model database template?

Which of the following is true about the model database template?



A) it cannot be customized
B) changes to it will affect existing databases
C) new databases will inherit settings from it
D) modifying model database settings requires different steps than user databases

Answer: C) new databases will inherit settings from it

What should you always do before creating a new database?

What should you always do before creating a new database?



A) backup the master system database
B) install a fresh instance of SQL Server 2012
C) delete all existing temporary databases
D) stop and restart the SQL Server service

Answer: A) backup the master database