tagged [increment]
auto_increment by group
auto_increment by group Is there a way with MySQL (5.0 specifically) to have an auto_increment field who's value is based on a grouping column? Example: I'd like to not have to go through any 'crazy' ...
- Modified
- 26 Mar at 02:19
CREATE TABLE new_table_name LIKE old_table_name with old_table_name's AUTO_INCREMENT values
CREATE TABLE new_table_name LIKE old_table_name with old_table_name's AUTO_INCREMENT values Can I create a new table with an old table's autoincriment status in mysql client? I think, that `ALTER TABL...
- Modified
- 3 Dec at 11:12
PHP mySQL - Insert new record into table with auto-increment on primary key
PHP mySQL - Insert new record into table with auto-increment on primary key Wondering if there is a shorthand version to insert a new record into a table that has the primary key enabled? (i.e. not ha...
- Modified
- 20 Sep at 21:42
auto increment ID in H2 database
auto increment ID in H2 database Is there a way to have an auto_incrementing BIGINT ID for a table. It can be defined like so but that has no effect (it does not increment automatically). I would like...
- Modified
- 8 Jul at 10:54
++i operator difference in C# and C++
++i operator difference in C# and C++ I have the following code written in both C++ and C# After this C# compiler brings an error But C++ compiler generate this code with no error and I got a result `...
- Modified
- 1 Mar at 13:38
C# multi-threaded unsigned increment
C# multi-threaded unsigned increment I want to increment an unsigned integer from multiple threads. I know about Interlocked.Increment, but it does not handle unsigned integers. I could use lock(), bu...
- Modified
- 14 Oct at 21:1
How to set auto increment primary key in PostgreSQL?
How to set auto increment primary key in PostgreSQL? I have a table in PostgreSQL with many columns, and I want to add an auto increment primary key. I tried to create a column called `id` of type `BI...
- Modified
- 23 Oct at 12:2
Get the new record primary key ID from MySQL insert query?
Get the new record primary key ID from MySQL insert query? Let's say I am doing a MySQL `INSERT` into one of my tables and the table has the column `item_id` which is set to `autoincrement` and `prima...
- Modified
- 15 Sep at 11:34
C# - increment number and keep zeros in front
C# - increment number and keep zeros in front I need to make a 40 digit counter variable. It should begin as `0000000000000000000000000000000000000001` and increment to `000000000000000000000000000000...
How can I increment a char?
How can I increment a char? I'm new to Python, coming from Java and C. How can I increment a char? In Java or C, chars and ints are practically interchangeable, and in certain loops, it's very useful ...
make an ID in a mysql table auto_increment (after the fact)
make an ID in a mysql table auto_increment (after the fact) I acquired a database from another developer. He didn't use auto_incrementers on any tables. They all have primary key ID's, but he did all ...
- Modified
- 4 Sep at 18:18
Interlocked.CompareExchange<Int> using GreaterThan or LessThan instead of equality
Interlocked.CompareExchange using GreaterThan or LessThan instead of equality The `System.Threading.Interlocked` object allows for Addition (subtraction) and comparison as an atomic operation. It seem...
- Modified
- 24 Oct at 02:15
How to create a auto incremented column in Documentdb
How to create a auto incremented column in Documentdb I want to create a document in azure documentdb with an auto-increment column. Is this possible? If yes, please guide me. Any help would be greatl...
- Modified
- 28 Aug at 02:56
MSSQL Select statement with incremental integer column... not from a table
MSSQL Select statement with incremental integer column... not from a table I need, if possible, a t-sql query that, returning the values from an arbitrary table, also returns a incremental integer col...
- Modified
- 22 Dec at 05:2
Increment Guid in C#
Increment Guid in C# I have an application that has a guid variable which needs to be unique (of course). I know that statistically any guid should just be assumed to be unique, but due to dev/test en...
Why the increment of an integer on C# is executed after a function return its value?
Why the increment of an integer on C# is executed after a function return its value? Why this two functions return different values? When I call this function passing 0 as parameter it returns 1 Howev...
- Modified
- 11 Sep at 13:21
Increment a database field by 1
Increment a database field by 1 With MySQL, if I have a field, of say logins, how would I go about updating that field by 1 within a sql command? I'm trying to create an INSERT query, that creates fir...
C# Post Increment
C# Post Increment While I am testing post increment operator in a simple console application, I realized that I did not understand full concept. It seems weird to me: The output has been false. I have...
- Modified
- 25 Dec at 10:57
How can I avoid getting this MySQL error Incorrect column specifier for column COLUMN NAME?
How can I avoid getting this MySQL error Incorrect column specifier for column COLUMN NAME? How can I avoid getting this MySQL error ? MySQL Error... SQL Schema... ``` CREATE TABLE discussion_topics ...
- Modified
- 1 Oct at 06:47
Incrementing a unique ID number in the constructor
Incrementing a unique ID number in the constructor I'm working on an object in C# where I need each instance of the object to have a unique id. My solution to this was simply to place a member variabl...
- Modified
- 13 Jul at 19:13
JavaDB: Is it possible to change auto-increment offset on existing table?
JavaDB: Is it possible to change auto-increment offset on existing table? Is it possible to change the auto-increment offset on a pre-existing table with JavaDB? I'm having a problem where inserting ...
- Modified
- 9 Dec at 21:47
ServiceStack: OrmLite and generic Insert<T> method returns weird number - not the PrimaryKey or any auto_increment
ServiceStack: OrmLite and generic Insert method returns weird number - not the PrimaryKey or any auto_increment I have this POCO that I am adding to a db: ``` public class MyObject { [ServiceStack.D...
- Modified
- 9 Dec at 15:3
When does ++ not produce the same results as +1?
When does ++ not produce the same results as +1? The following two C# code snippets produce different results (assuming the variable level is used both before and after the recursive call). Why? , Aft...
Interesting interview exercise result: return, post increment and ref behavior
Interesting interview exercise result: return, post increment and ref behavior Here's a simple console application code, which returns a result I do not understand completely. Try to think whether it ...
- Modified
- 22 Apr at 11:28
How do I add a auto_increment primary key in SQL Server database?
How do I add a auto_increment primary key in SQL Server database? I have a table set up that currently has no primary key. All I need to do is add a `primary key, no null, auto_increment`. I'm working...
- Modified
- 22 Mar at 07:25