how to insert values in this table for these two timestamps??? -
create table s_details(
-
SELECT_ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
-
TITLE varchar(4) NOT NULL,
-
FIRST_NAME varchar(20) NOT NULL,
-
MIDDLE_NAME varchar(20),
-
LAST_NAME varchar(20) NOT NULL,
-
DATE_OF_BIRTH date NOT NULL,
-
NATIONALITY varchar(20) ,
-
E_MAIL varchar(30) NOT NULL,
-
DATE_OF_ENTRY_OF_DETAILS TIMESTAMP DEFAULT 0,
-
MODIFIED_DATE timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-
);
4 2588
Heya, Praveena. Welcome to TSDN!
Please use CODE tags when posting source code:
[CODE=MySQL]
MySQL code goes here.
[/CODE]
Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).
Are you asking how to issue an INSERT query?
yeah,how to insert values for this table?
jus gimme an example to insert values..
Heya, Praveena.
Well, I'd guess it would work something like this: -
INSERT
-
INTO
-
`s_details`
-
(
-
`TITLE`,
-
`FIRST_NAME`,
-
`MIDDLE_NAME`,
-
`LAST_NAME`,
-
`DATE_OF_BIRTH`,
-
`NATIONALITY`,
-
`E_MAIL`,
-
`DATE_OF_ENTRY_OF_DETAILS`
-
)
-
VALUES
-
(
-
'title',
-
'first name',
-
'middle name',
-
'last name'
-
'date of birth',
-
'nationality',
-
'email',
-
CURRENT_TIMESTAMP
-
)
-
You don't need to specify a value for the `SELECT_ID` and `MODIFIED_DATE` fields; they will be automatically set for you.
thanx..
it helped me alot..
Sign in to post your reply or Sign up for a free account.
Similar topics
by: perplexed |
last post by:
How do you convert a user inputted date to a unix timestamp before
insterting it into your database? I have a form, with a textfield for
a date that the user inputs in the format mm-dd-yyyy and...
|
by: My Deja |
last post by:
what is the syntax for specifying the default values for timestamps in
MySQL in the CREATE TABLE command?
I have 2 timestamps, one for when the record was entered, the other
for any subsequent...
|
by: Greg Ofiesh |
last post by:
Anyone who can help,
I have two tables T1 and T2. T1 has fields K1 and F2 and T2 has fields
K2 and F1. F1 is the foreign key relating to K1 and F2 is the foreign
key relating to K2.
My...
|
by: Jaraba |
last post by:
I am working in a project that I need to parse an arrayt an select
records based upon the values parsed. I used the functions developed by
Knut Stolze in his article 'Parsing Strings'. I am...
|
by: Mohd Al Junaibi |
last post by:
Hello all,
my first post here...hope it goes well. I'm currently working on
stored procedure where I translated some reporting language into T-SQL
The logic:
I have a group of tables...
|
by: ebindia0041 |
last post by:
This is like the bug from hell. It is kind of hard to explain, so
please bear with me.
Background Info: SQL Server 7.0, Asp.net 1.1 with c#
I'm inserting simple records into a table. But one...
|
by: priyan |
last post by:
hai everyone,
I am having a doubt in inserting data in time field.
I am having a table in which in column in timestamp without time zone datatype. I want to insert a row into the table but...
|
by: ashes |
last post by:
Hi,
I am creating an ecommerce website using Microsoft Visual Studio, VB.Net and MS Access 2003. I am new to VB.Net
When someone wants to register on the website, they fill out a form and the...
|
by: AlexanderDeLarge |
last post by:
Hi!
I got a problem that's driving me crazy and I'm desperately in need of help.
I'll explain my scenario:
I'm doing a database driven site for a band, I got these tables for their discography...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |