473,378 Members | 1,413 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

automaticaly assign key in query with sqlserver

Hi,

I was wondering if there is a easy way to get automaticaly a new key when
you insert a query with sqlserver. Now I have to assign an ID=7, but I just
want to insert a query and set the keyvalue (ID) automaticaly (7).

Thanks,
Thierry
Nov 17 '05 #1
2 990
Just set the identity of the column to Yes/True in the Design Mode of the table (using Sql Server Enterprise Manager).

Hope that helps.
Wim Hollebrandse
http://www.wimdows.net
http://www.wimdows.com

---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
Nov 17 '05 #2
Just set the identity of the column to Yes/True in the Design Mode of the table (using Sql Server Enterprise Manager).

Hope that helps.
Wim Hollebrandse
http://www.wimdows.net
http://www.wimdows.com

---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: rjp | last post by:
Hi, I am using a SQLServer 7 SP4 version. I have scheduled one job with the SQLServer agent which backup the log of the databases every day. The command is : "backup log base to with noinit"...
0
by: Thierry | last post by:
Hi, I was wondering if there is a easy way to get automaticaly a new key when you insert a query with sqlserver. Now I have to assign an ID=7, but I just want to insert a query and set the...
15
by: laurenq uantrell | last post by:
Wondering if there is a physical or realistic limitation to the number of UNION statements I can create in a query? I have a client with approx 250 tables - the data needs to be kept in seperate...
1
by: Learner | last post by:
Hi there, I have installed Sql server 2005 developer on my machine which already has a Sql server 2000 installed on. Now i am trying to query the Sqlserver 2005 data(Ex: from Person.Address...
11
by: kirpi | last post by:
There is an SQLServer database somewhere, and I would like to grab and publish some data to my web pages. I was told: "please, do", and given server address, database name, id, and password. My...
1
by: Darsin | last post by:
Hi, I have three tables with there fields given in brackets: User: (PK), Divisions: (PK), DivisionsOfUsers: , the "DivisionsOfUsers" tables has many-to-many relationships between userid...
5
by: bobh | last post by:
Hi All, I have this query which updates a field based on the result of an IIF statement. The table is on SQLServer and I'm linked to it and it has many records and will take Access a very long...
2
by: Dinesh | last post by:
Hi experts, I am working on SQL Server 2005. Now i have to write a query which will extract some information from a table. My main table is having few columns supose 3 columns. EmpID ...
12
by: Yash | last post by:
My SQL query is like: SELECT ..... FROM tblCLAIM C INNER join tblXXX .... INNER join tblYYY ....(5 more joins) WHERE C.created_date between @start_date and @end_date AND...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.