At 11:51 AM 3/20/2008, you wrote:
What is the correct syntax to set a column's default to the current user?
When I try something like this
CREATE TABLE `Test` (`Editor` TEXT (3) DEFAULT '(CVAL('user'))')
I get this
-ERROR- Default length must be no longer than 60 chars (2791)
Charlie,
Use a computed column rather than using a computed value as a column default.
And, "Editor" is a RESERVED WORD.
Try something like:
CREATE TABLE `Test1` (`TblEdtr`= (CVAL('USER')) TEXT (50), TextCol TEXT (6))
Do you want the R:BASE user or the network user? For the network user, use
(CVAL('NETUSER')).
John