Entering Data into SQLDatabase

Hello Experts,

I'm trying to enter the following information into my SQL Database:

        CREATE TABLE [dbo].[EmployeeInfo](
        [PKEmployeeId] [bigint] IDENTITY(1,1) NOT NULL,
        [firstname] [varchar](50) NOT NULL,
        [lastname] [varchar](50) NULL,
        [email] [varchar](50) NOT NULL,
        [devicelist] [varchar](max) NULL,
        CONSTRAINT [PK_EmployeeInfo] PRIMARY KEY CLUSTERED
        (
         [PKEmployeeId] ASC
        )
        )
I'm gotten as far as shown in the following image, but I'm not sure how to enter CONSTRAINT etc into the database.

access
Can someone show me?

Regards
LVL 1
Member_2_7966113Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dustin SaundersDirector of OperationsCommented:
primaryKey.png
You can right click the row selector and choose to make a column your primary key, which basically does this:

CREATE TABLE [dbo].[ee_543](
	[PLEmployeeID] [bigint] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_ee_543] PRIMARY KEY CLUSTERED 
(
	[PLEmployeeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Member_2_7966113Author Commented:
Hi thanks responding.

I did what you suggested, but I don't see how that included the remaining:

 CONSTRAINT [PK_EmployeeInfo] PRIMARY KEY CLUSTERED
        (
         [PKEmployeeId] ASC
        )
        )
0
Vitor MontalvãoMSSQL Senior EngineerCommented:
Any PK has a constraint associated (it will create it automatically if you didn't provide one when defining the PK).
Do you have any other constraint that you want to create for the table?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Dustin SaundersDirector of OperationsCommented:
I'm not sure what you mean, its right here:
primaryKey2.png
Set the primary key on your table and the Script > CREATE TO and you can see the reflection.
0
Member_2_7966113Author Commented:
ok, yes I got it.

Thanks
0
Member_2_7966113Author Commented:
Thanks Dustin
0
Dustin SaundersDirector of OperationsCommented:
No worries, happy to help
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SQL

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.