MYSQL

MYSQL

View Answers

July 24, 2008 at 4:45 PM

How to select last row of the table in mySql

Here is the query given below selects tha last row of the table in mySql database.

SELECT * FROM stu_info ORDER BY ID DESC LIMIT 1;

The table structure that has used in this sql query.....

CREATE TABLE `stu_info` (
`ID` int(11) NOT NULL auto_increment,
`Name` varchar(20) default NULL,
`Phone` varchar(15) default NULL,
`City` varchar(20) default NULL,
PRIMARY KEY (`ID`)
)

In this table 'Id' is primary key. This query first arrange ID in descending order then find first one row from the table.
'Limit' keyword is used to select first rows from tha table for example....
limit 2 is used to select first two rows of the table.









Related Tutorials/Questions & Answers:
MYSQL
MYSQL  How to create time and date based trigger in mysql   MySQL Time Trigger
mysql
mysql  how to open\import table in .dbf format in mysql
Advertisements
mysql
you need to download the mysql-connector jar file for connecting java program from mysql database.......   Hi friend, MySQL is open source database... is the link for the page from where you can understand how to Download and Install MySQL
mysql
mysql  want the code for mysql nested select query with single where condition.want to select data from more than one table
MySql
MySql  what is default password of mySql, and how i configure mySql.   Hi, If you are installing MySQL on windows then you will have to provide the Password for the user root at the installation time.ADS_TO_REPLACE_1
MySQL
MySQL In this section we will read about what is MySQL, MySQL distribution, MySQL features, MySQL architecture etc. MySQL unofficially, pronounced as My... the database. The development, distribution, and support of MySQL is done
Dateformat in MySQL
Dateformat in MySQL  Date format in MySQL
mysql doubt
mysql doubt  1.What are the method to write malayalam in mysql command prompt?Is it necessary to write malayalam corressponding unicode in mysql command prompt? 2.How to store & retrieve Malayalam from mysql databases
Mysql connector
Mysql connector  Wer can i get mysql-connector? Is it jar or exe file.../pub/mirrors/maven/mysql/jars/mysql-connector-java-5.0.5.jar It will provide you the download option for mysql-connector-java-5.0.5.jar file. Thanks
Mysql connect
Mysql connect  i can have a mysql database file and mysql-connector-net .but i have not mysql database. how to connect vb.net thsis database.(C:\Documents and Settings\Admin\My Documents\VB.NET\Stock delna\STC.sql ). plz help me
Fortran with mysql
Fortran with mysql  Can i connect mysql with Fortran using java
MySQL NOT IN
MySQL NOT IN In this section we will read about how to use the NOT IN function in MySQL with a simple example. MySQL NOT IN() function specifies... which will demonstrate you about how to use MySQL not in() function
MYSQL Database
MYSQL Database  Can any one brief me about how to use MYSQL Database..., the MySQL database server is most popular database server and if you want to know about creating table and using MYSQL, just follow the below link
mysql - SQL
mysql  hi i want to export my data from mysql to excel using php script. pls help me  Hi Friend, Please visit the following link: http://www.roseindia.net/sql/mysql-table/mysql-php-select.shtml Thanks
MYSql with struts
MYSql with struts  How to write insert and update query in struts by using mysql database?   Please visit the following link: http://www.roseindia.net/struts/struts2/struts-2-mysql.shtml
service mysql restart: cPanel MYSQL 5.1 to 5.5
service mysql restart: cPanel MYSQL 5.1 to 5.5  service mysql restart: cPanel MYSQL 5.1 to 5.5
Mysql Upgrade on WHM (Mysql 5.1 to 5.5)cPanel
Mysql Upgrade on WHM (Mysql 5.1 to 5.5)cPanel   Mysql Upgrade on WHM (Mysql 5.1 to 5.5) cPanel
Upgrading databases between MySQL 5.0 to MySQL 5.5
Upgrading databases between MySQL 5.0 to MySQL 5.5  Upgrading databases between MySQL 5.0 to MySQL 5.5
Mysql Upgrade on WHM (Mysql 5.1 to 5.5) - cPanel
Mysql Upgrade on WHM (Mysql 5.1 to 5.5) - cPanel   Mysql Upgrade on WHM (Mysql 5.1 to 5.5) - cPanel
JSP &MYSQL
JSP &MYSQL  Develop a web page for the telephone directory using jsp and mysql
mysql - SQL
mysql  How to insert the check box values in mysql database through php
java-mysql
java-mysql  how i retrive all the values of a table in mysql to java forms or java table
php mysql
php mysql  automatically insert a value in the month field at the last date of current month in mysql database
php mysql
php mysql  automatically insert a value in the month field at the last date of current month in mysql database
Image in mysql
Image in mysql  Hi. How to insert and retrieve images in mysql db using JSP or JAVA Servlet? Thanks in advance
Java and Mysql
Java and Mysql  Sir, I want to connect my java program with mysql server (mysql server is situated on another windows machine ) ??? ???? ?????   Put mysql jar file in your jdk lib and set the classpath. After
MySQL - SQL
MySQL  how to set a time to repeat a trigger in Mysql?  Hi Friend, Please visit the following links: http://www.roseindia.net/mysql/mysql5/triggers.shtml http://www.roseindia.net/sql/trigger/mysql-time
Java and MySQL
Java and MySQL   I am doing a project on an accounting system. I need to know to things: How do I write reports using information in an MySQL database . How get multiple MySQL database rows and assign them to variables r
connectivity with mysql
/phpdatabase/Check-PHP-MySQL-Connectivity.html   Please visit the following.../tutorial/php/phpdatabase/ http://www.roseindia.net/sql/mysql-example/php-mysql
update mysql database
update mysql database  update mysql database
MySQL 5.5 perfomance
MySQL 5.5 perfomance  MySQL 5.5 perfomance
MySQL 5.5 perfomance
MySQL 5.5 perfomance  MySQL 5.5 perfomance
upgrade mysql whm
upgrade mysql whm  upgrade mysql whm
cpanel mysql version
cpanel mysql version  cpanel mysql version
cpanel mysql downgrade
cpanel mysql downgrade  cpanel mysql downgrade
Artifacts of mysql
List of Artifacts of mysql maven depenency
mysql - SQL
mysql  hi i am using mysql. i want to create simple table...=INNODB; For more information MySql visit to : http://www.roseindia.net/mysql/ Thanks
Mysql As
Mysql As       Mysql As is used to specify the another name for the existing column and table name... to understand an example from 'Mysql As'. To understand this example we create a table
user in mysql
user in mysql  how to create user in mysql?   Please visit the following link: http://www.roseindia.net/mysql/mysql5/mysql-creating-account.shtml (adsbygoogle = window.adsbygoogle || []).push
Version of mysql>mysql-connector-java dependency
List of Version of mysql>mysql-connector-java dependency
Version of mysql>mysql-connector-mxj dependency
List of Version of mysql>mysql-connector-mxj dependency
Version of mm-mysql>mm-mysql dependency
List of Version of mm-mysql>mm-mysql dependency
mysql - MobileApplications
* FROM Persons WHERE unit='india' For read more information on JDBC-Mysql visit to : http://www.roseindia.net/jdbc/jdbc-mysql/ http
mysql - WebSevices
mysql  Hello, mysql storing values in column with zero,but there is no 0.after 0 it is storing my values which i have extract from the file... when I want to store this value in mysql it store 0 first and than 60
Mysql Not
Mysql Not       Mysql... with ExampleADS_TO_REPLACE_1 The Tutorial illustrate an example from 'MySQL.... Query for Mysql not : select !0 : The !0 in the select Query is used to return
MYSQL - SQL
MYSQL  how to select last row in table?(MYSQL databse)   How to select last row of the table in mySql Here is the query given below selects tha last row of the table in mySql database. SELECT * FROM stu_info
MySQL Configuration
MySQL Configuration       In this lesson you will read how to configured of mysql.  This lesson you will also read how to easily configuring your server under window . The mysql
MySql,java
MySql,java  In MySQL table i am adding the fields of name,photo,video,age,category.in the category i have some subjects.if one person login into my-site the he upload the one video under one subject.then i want the following
secure php mysql connection
secure php mysql connection  secure php mysql connection script
connection with MySQL to java.
connection with MySQL to java.   how to connect MySQL database with jsp

Ads