Disclaimer: Its a collection from lots of other site(s) and few of my notes. I would also like to declare that I am not owning lots of its content. Please feel free to contact me directly if you want me to remove any of your content, that you don't want to share to other through this blog.
Friday, 14 June 2013
mysql simple table creation
Creating a new table with the time value: and then entering value of the current time too:
* create table <table_name> (TIMESTAMP timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, TRAFFIC int(4), RES_TIME_MS int(5));
* insert into <table_name> value(now(), 17,65);
- From command line updating the value:
* mysql -uroot -p<password> -e "use <database_name>; insert into <table_name> value(now(), 17,65)"
* mysql -uroot -e "insert into <database_name>.<table_name> vaule(now(),17,70)"
* mysql -uroot -e "select * from <database_name>.<table_name>"
Labels:
mysql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment