Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a script in SQL that creates four login IDs based on the contents of a new table called NewLogins. CREATE TABLE NewLogins (LoginName varchar(128))

Write a script in SQL that creates four login IDs based on the contents of a new table called NewLogins.

CREATE TABLE NewLogins (LoginName varchar(128)) INSERT NewLogins VALUES ('BBrown'), ('CChaplin'), ('DDyer'), ('EEbbers')

Use dynamic SQL and a cursor to perform four actions for each row in this table: (1) create a login with a temporary password based on the first four letters of the login name followed by 99999; (2) set the default database to the AP database; (3) create a user for the login with the same name as the login; and (4) assign the user to the PaymentEntry role.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

ISBN: 0805360476, 978-0805360479

More Books

Students also viewed these Databases questions

Question

Evaluate your organizational culture as well as your current skills

Answered: 1 week ago

Question

12-5 How will MIS help my career?

Answered: 1 week ago