Click here to Skip to main content
15,898,611 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
how to create the table daily & table name change according to the date in MYSQL.
i want syntax of this.
thanks in advance.
Posted
Comments
Sandeep Mewara 14-Jun-11 11:08am    
You need to provide more information on how & what are you doing?
Kschuler 14-Jun-11 11:40am    
Are you asking how to automate creating a table each day? Is this for a backup? What's in the table?

1 solution

Start with MySql Connector/Net[^] and check out CREATE TABLE ...[^]

The get the current date and time in C# with DateTime.Now[^] and creating a table in a database is simple

SQL
CREATE TABLE tk (col1 INT, col2 CHAR(5), col3 DATE);


Where you can replace tk with the date from DateTime.Now
 
Share this answer
 
Comments
vrushali katkade 15-Jun-11 0:37am    
actually this task done by only MYSQL not me like daily event & i want the syntax of the event
Kim Togo 15-Jun-11 2:56am    
The syntax for showing MySql Events is SHOW CREATE EVENT

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900