5
Contributors
9
Replies
10
Views
7 Years
Discussion Span
Last Post by sandeepji1
0

you didnt get it. i want to change column id position from 3 to first

0

In a database, the order of the columns in the table is TOTALLY irrelevant. The same is true for the order of the rows. This is an important basic concept in relational databases.

In other words it just doesn't matter at all, you write your query and STATE the columns you wish to be working with, in whatever order suits yours query.

eg table people with columns address, firstName id, town, surname, age, postcode/zipcode can be queried in any order you choose, such as
select id, surname, firstName, address, town postcode/zipcode from people.
or
select age, firstName, surname, town from people.

0

consider:
form
id,username,age,etc
if i enterid,all other fields should get automatically filled. can anyone suggest good sites for php,sql,etc

0

consider:
form
id,username,age,etc
if i enterid,all other fields should get automatically filled. can anyone suggest good sites for php,sql,etc

www.w3schools.com
www.tizag.com

That's what I used to learn about PHP and mySQL.
w3schools might be better for it because it shows them combined.

0

Hi, According to me you want output like that form table
"SELECT id,name,sname FROM Table_name";
But I have doubt in mention query, then please mention your query in proper way,Only then I'll Help you, with efficient way.

Edited by sandeepji1: n/a

0

For that qyery you follow the concept of Alias, & here I mention a simple sql query,

"SELECT First_Name AS F_Name, Last_Name AS L_Name, Annual_Salary Package From Table_Name";

note here we use AS Keyword, but that's not Compulsory see carefully that Query.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.