Databases| SQL| MySQL| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
SQL Date 
 

The SQL Date is used when you are working with dates. This include the format of data ,the insert value matches the format of the data column in the database.

 

SQL Date

                         

 

The SQL Date is used when you are working with dates. This include the format of data ,the insert value matches the format of the data column  in the database. The query contain only the date portion, which you want to retrieve the data as per your given query. 

Understand with Example

The Tutorial illustrate a Example from SQL Date. In this Tutorial, we create  a  Table 'Stu_Table' with its field attribute and data type using create table statement in database. The insert into statement is used to insert the records or rows into table of the database.

  create table : The create table keyword in SQL Statement is used to create a table in database.

  Insert into : The insert into is used to add the records or rows value into the table of database.

The field attribute used in 'Stu_Table' are Stu_Id,Stu_Name,Stu_Class and Stu_Dob and their data types are integer, varchar and Date respectively. The create statement show you a table Stu_Table with the specified fields. The data type for storing a date or date value in database is given as:

                Date : The format used to store the Date is YYYY-MM-DD 

Once your table is created, The insert into query will run to add the records or rows to your create Stu_Table Table in your database.The select is used to retrieve the records or rows from a table Stu_Table. 

Create Table Stu_Table

create table Stu_Table(Stu_Id integer(2), Stu_Name varchar(15),
Stu_Class  varchar(10), Stu_Dob Date)

Insert data into Stu_Table

insert into Stu_Table values(1,'Komal',10,'1999,11,1');
insert into Stu_Table values(2,'Ajay',10,'1999,10,1');
insert into Stu_Table values(3,'Rakesh',10,'1999,11,1');
insert into Stu_Table values(4,'Bhanu',10,'1999,11,1');
insert into Stu_Table values(5,'Santosh',10,'1999,11,1');

Stu_Table

Stu_Id Stu_Name Stu_Class Stu_Dob
1 Komal 10 1999-11-1
2 Ajay 10 1999-10-1
3 Rakesh 11 1999-11-1
4 Bhanu 11 1999-11-1
5 Santosh 12 1999-11-1

                         

» View all related tutorials
Related Tags: sql mysql c string function fun io sed char return character unc cte to e use from left in m

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.