473,326 Members | 2,128 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,326 software developers and data experts.

How to alter the default values in tables

Hi,
I create a one table name is customer.

create table customer
(id timestamp);

table created..

Now i need add deafult values to id column.

default value is current_timestamp.
Dec 1 '07 #1
1 1288
mwasif
802 Expert 512MB
Now i need add deafult values to id column.

default value is current_timestamp.
You have only one column in the table and no data. Add another column in the table and add some value to the new added column. The defaul timestamp value will be saved automatically. Default value will be set against some data which you don't have.

You can read in detail here.
Dec 1 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Dan Edwards | last post by:
Hi about 2 months ago I had trouble with alter table on large tables blocking all database activity and started a thread on this list called "alter table blocks other tables!" I tried to resolve...
3
by: M Simpson | last post by:
/* for the google index */ ALTER TABLE DEFAULT COLUMN DEFAULT VALUE I've worked out several stored procedures for altering the default column values in a table. They were compiled from books...
2
by: me | last post by:
I would like to add an Identity to an existing column in a table using a stored procedure then add records to the table and then remove the identity after the records have been added or something...
7
by: Jon Combe | last post by:
I have created the following test SQL code to illustrate a real problem I have with some SQL code. CREATE TABLE JCTable ( CustomerName varchar(50) ) ALTER TABLE JCTable ADD CustomerNo int...
1
by: Programmer | last post by:
Hi All Here is my problem I'm using a SQLDataAdapter and DataSet I use the method FillSchema(myDataset, SchemaType.Source) The problem is that when i Check the default Values of the Dataset...
7
by: Serge Rielau | last post by:
Hi all, Following Ian's passionate postings on problems with ALTOBJ and the alter table wizard in the control center I'll try to explain how to use ALTOBJ with this thread. I'm not going to get...
2
by: Jeff_in_MD | last post by:
Hi, I'm trying to add a column to a table, then update that column with a query. This is all within a single batch. Sqlcmd gives me an error on the update, saying "invalid column xxx", because...
6
by: Barry | last post by:
In sqlserver 2000 I have a UDF which works fine but I want to make a change to it. When I do an ALTER FUNCTION ... I get an error saying that I can't alter the function because it is referenced by...
11
by: raylopez99 | last post by:
Keep in mind this is my first compiled SQL program Stored Procedure (SP), copied from a book by Frasier Visual C++.NET in Visual Studio 2005 (Chap12). So far, so theory, except for one bug...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.