CS107 Module 3.1 - Data Definition Language (DDL) in SQL Server
30 Questions
3 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the precision and scale of a field defined as precision 5 and scale 2?

  • Precision 5, scale 3
  • Precision 5, scale 2 (correct)
  • Precision 2, scale 5
  • Precision 3, scale 2
  • What data type accurately stores monetary values up to a ten-thousandth of a monetary unit?

  • Real
  • Smallmoney (correct)
  • Money
  • Float
  • Which system data type accurately represents floating precision numbers equivalent to float(24)?

  • Double
  • Decimal
  • Float
  • Real (correct)
  • What is the range of values that can be stored in a datetime data type?

    <p>January 1, 1753 - December 31, 9999</p> Signup and view all the answers

    Which text data type is fixed-length and non-Unicode with a maximum capacity of 8000 characters?

    <p>Char</p> Signup and view all the answers

    What is the purpose of the NEWID() function in SQL Server?

    <p>To create globally unique identifiers for tracking numbers</p> Signup and view all the answers

    What does the system datatype 'float(2)' indicate about the precision of the stored values?

    <p>It stores up to two decimal places</p> Signup and view all the answers

    Which data type in SQL Server is suitable for variable-length binary data with a maximum size declared as (2,147,483,677) bytes?

    <p>varbinary(max)</p> Signup and view all the answers

    What is the main advantage of using varbinary over binary in SQL Server?

    <p>Uses less hard-disk space</p> Signup and view all the answers

    What type of SQL Server authentication involves clicking on 'Connect' after selecting 'Windows Authentication'?

    <p>Windows Authentication</p> Signup and view all the answers

    Which of the following is NOT considered a database object that can be modified using a Data Definition Language (DDL) in SQL Server?

    <p>Binary Data</p> Signup and view all the answers

    What is the maximum length for fixed-length binary data stored using the 'binary' type in SQL Server?

    <p>8000 bytes</p> Signup and view all the answers

    Which datatype is used to store entire XML documents or fragments?

    <p>xml</p> Signup and view all the answers

    What is the purpose of using nvarchar over nchar?

    <p>It uses less disk space when there are fewer characters.</p> Signup and view all the answers

    Which datatype allows storing values of different datatypes except for certain specified ones?

    <p>sql_variant</p> Signup and view all the answers

    What is the maximum length of characters that nchar can hold?

    <p>4000 characters</p> Signup and view all the answers

    Which datatype is used to track changes to data by timestamping records?

    <p>timestamp</p> Signup and view all the answers

    What differentiates nvarchar from nvarchar(max)?

    <p>nvarchar(max) can hold up to 2,147,483,677 bytes of data</p> Signup and view all the answers

    What is the maximum database size supported by SQL Server?

    <p>1,000,000 terabytes</p> Signup and view all the answers

    How many simultaneous instances of SQL Server can run on a single computer?

    <p>16</p> Signup and view all the answers

    What data type in SQL Server can contain only a value of 1 or 0?

    <p>bit</p> Signup and view all the answers

    What is the purpose of the SQL statement 'create database friends_information;'?

    <p>To create a new database</p> Signup and view all the answers

    Which statement controls whether you can use the equality operator to test for null?

    <p>SET ANSI_NULLS ON/OFF</p> Signup and view all the answers

    In SQL, what does the 'not null' concept imply?

    <p>Fields must not be empty</p> Signup and view all the answers

    What is the range of values for the 'int' data type in SQL Server?

    <p>-2,147,483,648 to 2,147,483,647</p> Signup and view all the answers

    Which part is not considered as a component of a database in SQL Server?

    <p>Indexes</p> Signup and view all the answers

    Which SQL statement is used to open a table for viewing data?

    <p>Right-Click on the Table Name Click on Open Table</p> Signup and view all the answers

    What is the function of the 'default' concept in SQL?

    <p>It sets a default value for a field if no value is specified</p> Signup and view all the answers

    What does the SQL statement 'create table information(...);' primarily do?

    <p>Define the structure of a new table</p> Signup and view all the answers

    Which SQL statement allows you to execute a SQL query in SQL Management Studio?

    <p>Click on New Query Type your SQL statement inside the SQLQuery Windows Click on Execute</p> Signup and view all the answers

    More Like This

    Use Quizgecko on...
    Browser
    Browser