473,386 Members | 1,712 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,386 software developers and data experts.

Some questions on MySQL

hello

I have some questions. Pls help me

1. How can I repeace the column name ?

Eg. Column names: Std_Id, Std_Name, Phone etc...

I want to replace column name "Phone" by "Roll" .Both are INT type.

2. Can I change Primary Key column name and how?


3. Is it possible to make Date and time value as an integer value and substract that time value with another time value, and the result convert into second ? Pls can u tell me how?

3. I want to subtract the following 2 times and want to get folowing result

2008-01-30 07:10:25 - 2008-01-30 07:10:20 = 5 (sec.)

Is it possible?

If u dont understand my question pls feedback me.

Thanking all of friends who r engaged to help new students in MySQL.
Jan 30 '08 #1
2 983
r035198x
13,262 8TB
hello

I have some questions. Pls help me

1. How can I repeace the column name ?

Eg. Column names: Std_Id, Std_Name, Phone etc...

I want to replace column name "Phone" by "Roll" .Both are INT type.

2. Can I change Primary Key column name and how?


3. Is it possible to make Date and time value as an integer value and substract that time value with another time value, and the result convert into second ? Pls can u tell me how?

3. I want to subtract the following 2 times and want to get folowing result

2008-01-30 07:10:25 - 2008-01-30 07:10:20 = 5 (sec.)

Is it possible?

If u dont understand my question pls feedback me.

Thanking all of friends who r engaged to help new students in MySQL.
Read the MySQL reference manual for the alter table command and also for the date and time functions there.
Jan 30 '08 #2
Hi,

To replace column name use query:

ALTER TABLE tablename CHANGE COLUMN oldcolname newcolname new coltype;
Jan 30 '08 #3

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

Similar topics

0
by: jordi | last post by:
Hi, I'm starting to use Python embedded in a C program. I'm using Python to execute several scripts using as a variables information retrieved for several multithread "agents" written in C. ...
5
by: Titi Anggono | last post by:
Hi all, I have some questions: 1. Can we use Tkinter for web application such as Java ? 2. I use gnuplot.py module for interfacing with gnuplot in linux. Can we make the plot result shown in...
1
by: Tony Johansson | last post by:
Hello Experts! I have some questions about inheritance that I want to have an answer to. It says "Abstract superclasses define a behavioral pattern without specifying the implementation" I...
50
by: Jatinder | last post by:
I 'm a professional looking for the job.In interview these questions were asked with some others which I answered.But some of them left unanswered.Plz help. Here are some questions on C/C++, OS...
0
by: micro_bug | last post by:
Now I am developing a tool, just like VS.net Form Edition environment. User can edit a component's properties by a PropertyGrid control. Now I have some questions about this PropertyGrid control:...
2
by: Servé Lau | last post by:
I have been rewriting a C++ isapi into a C# asp.net application, but because it was my first one and created within a tight schedule I have some questions to make sure if I did it right. 1. Does...
2
by: Kelvin Tran | last post by:
To whom it may concerns: I have some questions about VB.net 2003 as listed below. 1.. How to print out VB.net design form? 2.. How to create a line graph (Strip chart) in VB.net 2003? 3.. Is...
27
by: fctk | last post by:
hello, i have some questions. 1) do constant expressions include string literals? for example, is "hello, world" a constant expression? 2) int i = 0; is the equal sign the assignment...
30
by: GeorgeRXZ | last post by:
Hi Friends, I have some questions related to C Language. 1What is the difference between the standard C language and Non standard C language ? 2which is better C Lanugage, C under Linux/...
0
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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...
0
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.