has autonumbering -
insert into table1 (field2, field3) select (field2, field3) from table1;
autonumbering will automatticaly be applied :-)
Danny
Schimmel LCpl Robert B (GCE 2nd Intel Bn Web Master) wrote:
Here is the problem that I am having. I am trying to make a copy of a
full record
Schimmel LCpl Robert B (GCE 2nd Intel Bn Web Master) wrote:
That is the effect that I am looking for, but exactly the method that
I
am trying to avoid. If I type the column names into my INSERT...
SELECT
and someone later adds a column to the table, I would have to go back
into my program
Actually, both of your solutions worked. Thanks much for the input guys.
Rob
-Original Message-
From: Michael Stassen [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 12:20 AM
To: Schimmel LCpl Robert B (GCE 2nd Intel Bn Web Master)
Cc: Danny Stolle; mysql@lists.mysql.com
Here is the problem that I am having. I am trying to make a copy of a
full record in a table that has a primary key with auto-increment. The
real problem is that I want the statement to use SELECT * so that if
columns ever get added to the table the statement will still work for
the full record. I
try distinct(column name)
JCampbell wrote:
I want to know if it is possible to build a MySQL query which will only
return the unique values of a specific column. Ie if I had this table:
id | name |date___
1 | Jon | 2001-01-03
2 | Bob | 2001-01-04
3 | Jon | 2001-01-05
Is
I agree, I don't think there is a function in MySql, it will do the job.
May be you can use the following algorithm
1. fetch all rows item description.
2. Split into words and put it in a array.
3. Create a counter array of the same limit of word array.
4. in a for loop, count number of time
or you can try the following code
$result=@mysql_db_query($db_name,$query,$link);
$num=@mysql_num_rows($result);
if($num=0):
echo "No records found";
endif;
Martin Cloutier wrote:
Try this:
$RESULT_SET = mysql_query("SELECT * FROM $table where description LIKE
'%$keyword%'");
Hello,
I would like to change the default date format MySql from /mm/dd to
dd/mm/. Does anyone know, how to make this change in MySql?
Thanks.
-
Before posting, please check:
http://www.mysql.com/manual.php (the
Thank paul. I know about Date_format, but was curious if there is some
setup parameters would allow us to define the MySql date format .
Paul DuBois wrote:
On Fri, Jan 26, 2001 at 01:40:12PM -0700, Web master wrote:
Hello,
I would like to change the default date format MySql from
select max(rating) from singlemalts will give you the highest value
or
select * from singlemalts order by rating desc
will give all the rows ordered by rating and the first row will have the
highest value
Richard Reina wrote:
I've tried the manual (and the Oreily MySQL book) and played
10 matches
Mail list logo