473,386 Members | 1,706 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.

Regarding : Views Concept in Mysql

147 100+
hi,

I want to know Some "Views Concept ".Now only,i am learning "View Concept".


1. what is the main use of "VIEWS" ? (using in mysql)

2.I try some queries using "VIEWS".I am creating a new View table with a Select query using more than one table. As per rule,it doesn't get updated in "View Table" as well as from the "base table"(using table in select query)

Expand|Select|Wrap|Line Numbers
  1.  For Example :create view customers_view(cid,name,salary) as select a.cid,a.name,b.salary from customers a,orders b where a.cid=b.cid;
  2.  


now :View Table is Created.

Then : I am trying to update the values in the View Table ....its get updating.The values should not get update if we are using more than one table in the select query..Did i following correctly.


Its get updating in the "Base Table also".Please tell me out.Thanks in advance
Feb 3 '10 #1
1 1879
views are just like tables(virtual tables) in database but will not really exist in the disk. Views are useful when you want to group columns from different tables or create view under certain conditions and perform usual table operations on it.

you can update a view(restrictions apply)!! views are not independent and is just a part of a tables.

mysql doc says: You cannot use UPDATE to update more than one underlying table of a view that is defined as a join. here
Feb 5 '10 #2

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

Similar topics

0
by: Lloyd Dobbler | last post by:
Hi, I'm not that up on SQL as a whole as I've concentrated mainly on frontend and most of the DB backend work I've done has been with "Access" as that's all the site needed. I have however...
3
by: Claude Schneegans | last post by:
Hi, Are VIEW supported in MySQL? It looks like thay are not. -- _______________________________________ (Please send any spam to this address: piegeacon@internetique.com) Thanks.
8
by: Mike | last post by:
Hello, I have a few rather urgent questions that I hope someone can help with (I need to figure this out prior to a meeting tomorrow.) First, a bit of background: The company I work for is...
6
by: ritesh | last post by:
Hi, I have been reading some text on C and C++ (i.e advanced books). One of the books mentioned that C++ requires a runtime support whereas C does not - what the author was trying to say was...
3
by: CSN | last post by:
Just wondering, is updateable views slated for a future version of Postgresql? In addition to using rules that is. CSN __________________________________ Do you Yahoo!?
28
by: mooreit | last post by:
The purpose for my questions is accessing these technologies from applications. I develop both applications and databases. Working with Microsoft C#.NET and Microsoft SQL Server 2000 Production and...
3
by: news.bahnhofbredband.se | last post by:
Some time ago I was working with DB2/400 - and one of the most appreciated features was the concept logical files - a bit more than views in that they maintained an access path. That is it...
33
by: Peter | last post by:
People are telling me it is bad to put select * from <atable> in a view. I better should list all fields of the table inside the definition of the view. I dont know exactly why but some...
1
pbmods
by: pbmods | last post by:
Today I'd like to talk about a new feature introduced in MySQL 5: Views. Views are like snapshots of queries. You can save any query as a view, even complex queries with joins and subqueries,...
3
by: Damodhar | last post by:
Whats the simple definition in VIEWS. in mysql
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
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...

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.