Loading...

SQL Server

What does DML stand for ?
  1. Different Mode Level
  2. Data Model Language
  3. Data Mode Lane
  4. Data Manipulation language
With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” ends with an “a” ?
  1. SELECT * FROM Persons WHERE FirstName=’a’
  2. SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
  3. SELECT * FROM Persons WHERE FirstName LIKE ‘%a’
  4. SELECT * FROM Persons WHERE FirstName=’%a%’
With SQL, how can you return all the records from a table named “Persons” sorted descending by “FirstName” ?
  1. SELECT * FROM Persons SORT BY ‘FirstName’ DESC
  2. SELECT * FROM Persons ORDER FirstName DESC
  3. SELECT * FROM Persons SORT ‘FirstName’ DESC
  4. SELECT * FROM Persons ORDER BY FirstName DESC
With SQL, how can you return the number of not null records in the “Persons” table ?
  1. SELECT COUNT() FROM Persons
  2. SELECT COLUMNS() FROM Persons
  3. SELECT COLUMNS(*) FROM Persons
  4. SELECT COUNT(*) FROM Persons
What does the ALTER TABLE clause do ?
  1. The SQL ALTER TABLE clause modifies a table definition by altering, adding, or deleting table columns and/or constraints
  2. The SQL ALTER TABLE clause is used to insert data into database table
  3. THE SQL ALTER TABLE deletes data from database table
  4. The SQL ALTER TABLE clause is used to delete a database table
The UPDATE SQL clause can
  1. update only one row at a time
  2. update more than one row at a time
  3. delete more than one row at a time
  4. delete only one row at a time
The UNION SQL clause can be used with
  1. SELECT clause only
  2. DELETE and UPDATE clauses
  3. UPDATE clause only
  4. All oF the mentioned
Which SQL statement is used to return only different values ?
  1. SELECT DIFFERENT
  2. SELECT UNIQUE
  3. SELECT DISTINCT
  4. SELECT ALL
Which SQL keyword is used to sort the result-set ?
  1. ORDER BY
  2. SORT
  3. ORDER
  4. SORT BY
How can you change “Hansen” into “Nilsen” in the “LastName” column in the Persons table?
  1. UPDATE Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’
  2. MODIFY Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
  3. MODIFY Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’
  4. UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’