WebFaction
Community site: login faq

Hello,

I'm migrating my database to the one I have hosted now in Webfaction and I need to use some "view" tables for my MySql database.

I get an error when trrying to execute "CREATE VIEW" statement... is there any way to do it?

Thanks in advance

asked 01 Jul '12, 04:59

jmruiz
33
accept rate: 0%

edited 01 Jul '12, 06:54


Yes you can create a view using the following syntax:

CREATE VIEW db_name.view_name AS SELECT * FROM table;
permanent link

answered 01 Jul '12, 06:31

timg ♦♦
1.3k4
accept rate: 30%

That's right... I didn't noticed that the old "db_name" was everywhere inside the "create view" I was trying to execute.

Thanks a lot!!

permanent link

answered 01 Jul '12, 06:56

jmruiz
33
accept rate: 0%

edited 01 Jul '12, 08:24

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×168
×9
×3

question asked: 01 Jul '12, 04:59

question was seen: 2,474 times

last updated: 01 Jul '12, 08:24

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM