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

Select/update in MySQL Stored Procedure

I'm sorry if this is a really stupid question, but I have just started using mySQL.

I have created a basic stored proc, which does the following:

SELECT * from members;

I can call it from mySQL Query Browser and return the results, but the recordset can't be edited.

Is there any way that the results from a stored procedure can be directly edited, or should I be using views?

Thanks
Penny
Feb 13 '08 #1
3 3491
ronverdonk
4,258 Expert 4TB
Questions are not stupid, answers can.

A SELECT is just a read from a table. To update a table you need an INSERT (new row) or an UPDATE (existing row). You can do these from within a stored proc, but you'll have to write the logic for that within the proc.

In short: you cannot just 'save' the result set of a SELECT, inside or outside a stored proc.

Ronald
Feb 14 '08 #2
Thank you for clearing that up for me.

I really appreciate it.

Penny
Feb 15 '08 #3
ronverdonk
4,258 Expert 4TB
Thank you for clearing that up for me.

I really appreciate it.

Penny
You are welcome and we'll see you again.

Ronald
Feb 15 '08 #4

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

Similar topics

6
by: Patrick | last post by:
Hello I have many different tables, that most have the same structure.. they all have some primary key, some fields and mylinkid ... so what I want to make is to create a stored procedure, where...
7
by: Michael C# | last post by:
Is it possible to create Dynamic SQL queries in MySQL, like in SQL Server? i.e., the EXECUTE command or sp_executesql stored procedure in SQL Server. TIA
3
by: taru | last post by:
Env: DB2 UDB 8.1 on AIX We are executing a db2 sql stored procedure which is invoked from a java client. The stored procedure contains few select, insert and update statements. Using the DB2...
2
by: bshumsky06 | last post by:
Hi, I am trying to create stored procedures in MySQL. Does anyone have a suggestion on a good IDE to use. I have been working with the MySQL Query Browser but it generates errors very often and...
8
by: yrrah | last post by:
Hello, i've a problem regarding the select stmt inside the stored procedure. Here's my code: DELIMITER $$ DROP PROCEDURE IF EXISTS `p`.`getNames`$$ CREATE PROCEDURE `p`.`getNames`(q...
0
by: Geethu03 | last post by:
Hi I had a doubt in Mysql Stored procedure. i need to read a text file (that is stored in mysql database) using the Stored procedure. i know little bit about the Stored procedure but i am not...
5
by: Chris Cowles | last post by:
I use an application that uses Oracle 8.1.7. All functions of the application are completed with calls to stored procedures. A data entry error occurred that caused thousands of records to be...
2
by: kxyz | last post by:
Hello everyone, I need help with a stored procedure or two. My stored procedures are supposed to check if a certain record exists. If it does exist, then I select everything from that row, as...
3
by: XolileWarren | last post by:
Hi Everyone I'm trying to create a stored procedure that will delete groups that are in-active for a month. Table description i have two table which are linked together using groupID, when...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.